View Full Version : turning off bounding rectangle around QGraphicsPixmapItem
di_zou
24th March 2010, 13:19
I have QGraphicsScene with a bunch of QGraphicsPixmapItems in it. When I click on the item, the bounding rectangle around the pixmap is displayed. How do I turn off displaying the bounding rectangle?
di_zou
30th March 2010, 14:33
Any suggestions?
spud
30th March 2010, 14:57
This is the default way of a QGraphicsItem to show it has been selected.
If you don't need the feature you could call
item->setFlag(QGraphicsItem::ItemIsSelectable, false)
otherwise you have to subclass QGraphicsPixmapItem and override the paint method.
Lykurg
30th March 2010, 15:04
otherwise you have to subclass QGraphicsPixmapItem and override the paint method.
... and chance the QStyleOptionGraphicsItem (e.g. remove QStyle::State_HasFocus). Search the forum. This question was asked several times.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.