Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Disappearing QGraphicsObject!

$
0
0
Hi guys! :) I’ve lately encountered quite strange problem, mainly: there is a class called “edge” that creates QGraphicsObject – a segment – which endpoints are based on two other QGraphicsObjects positions the boundingRect() is redefined and the resulting bounding rectangle is created from segment endpoints locations the segment is created with: painter->drawLine(pstart, pend); inside the paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) function Where pstart and pend are QPointF points derived from QGraphiccObjects locations, which are input to the class THE PROBLEM – when moving the scene by mouse draging or using keys, segments dissapear when some part of them is already behind the GraphicsView, seems like the paint function inside the “edge” class is not working at that moment. I really do not know what is the problem. Any idea what might have gone wrong? :(

Viewing all articles
Browse latest Browse all 18427

Trending Articles