tonio
25th June 2009, 07:48
Hello,
I'm using a path item to draw a line that connects 2 other items.
I have a strange selection problem. When I click not far away from the path item, my program says that the item is selected. So I looked around in the net and I found this post:
http://labs.trolltech.com/blogs/2008/01/08/accurate-update-regions-for-thin-qgraphicsitems/
So I tried to define a new bounding region granularity but every this when the granularity is different from 0, my program crashes.
Here is what my GDB says:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6e9e6c0 (LWP 10224)]
0xb7de7985 in QGraphicsItem::boundingRegionGranularity () from /usr/lib/libQtGui.so.4
And I don't have an idea why ...
Do you have any ideas and an example for how to use this setBoundingRegionGranularity().
In my program I'm using this method in the constructor of the class that is representing the path item (the class is a subclass of the QGraphicsPathItem).
Thank you in advance.
Best regards,
Anton
I'm using a path item to draw a line that connects 2 other items.
I have a strange selection problem. When I click not far away from the path item, my program says that the item is selected. So I looked around in the net and I found this post:
http://labs.trolltech.com/blogs/2008/01/08/accurate-update-regions-for-thin-qgraphicsitems/
So I tried to define a new bounding region granularity but every this when the granularity is different from 0, my program crashes.
Here is what my GDB says:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6e9e6c0 (LWP 10224)]
0xb7de7985 in QGraphicsItem::boundingRegionGranularity () from /usr/lib/libQtGui.so.4
And I don't have an idea why ...
Do you have any ideas and an example for how to use this setBoundingRegionGranularity().
In my program I'm using this method in the constructor of the class that is representing the path item (the class is a subclass of the QGraphicsPathItem).
Thank you in advance.
Best regards,
Anton