C++ (Qt)void QGraphicsView::fitInView ( const QRectF & rect, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio )
C++ (Qt)QRectF QGraphicsItem::boundingRect () const [pure virtual]bool QGraphicsItem::collidesWithPath ( const QPainterPath & path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const [virtual]
GraphNodeConnectionTopDown::GraphNodeConnectionTopDown(int w): bridgeWidth(w){ //bridgePen.setColor(QColor(60,60,60,255)); bridgePen.setColor(Qt::darkBlue); bridgePen.setWidth(1);}QRectF GraphNodeConnectionTopDown::boundingRect() const{ QPointF ptPositon(0,0); QSizeF size(bridgeWidth, 20); return QRectF(ptPositon, size);}
GraphNodeConnectionTopDown* nodeBridge = new GraphNodeConnectionTopDown(width); nodeBridge->boundingRect(); nodeBridge->setX(x1); nodeBridge->setY(bridgeYPos); nodeBridge->show(); nodesConnectionGui.append(nodeBridge);