qgraphicsItem not getting highlighted on selection
Unsolved
General and Desktop
-
Hi, I have a qgraphicsItem which has been set as Selectable and Movable. As per observation, the Item is getting selected and Moved as well.
The requirement is that on getting selected, the boundary of the item shall turn to dotted lines which would make it easier for the end user. For some reason I am not able to achieve this.
Is there something explicit to be done to achieve this that I am missing out on?Thanks.
-
Hi,
Is that a custom QGraphicsItem ?
-
Yes @SGaist
-
Then it's your job in the paint event to draw whatever you want to do the highlighting.
Basically:
if (option->state & QStyle::State_Selected) { // You highlighting specific stuff }