qt - QGraphicsItem unselect redraw problem -


Very easy QT GUI applications:

  • On this view I have multiple circles that QGraphicsItem
  • boundingRect gives square around this circle.
  • The method is not 'shape' override.

The problem occurs when 'Ve' is added to the Paint () method:

  if (selected) (painter-> Direct (Re);}  

The selection is well-prepared, but unselected does not cause redering. At the log level, I can see that this item was actually lost in the selection flag. It is also worthwhile to change calling updates () from the item. Thank you in advance for any suggestions.

10 Days after i Back to this problem and found that my QGraphicsItem created with setCacheMode (DeviceCoordinateCache); OMG! Stupid mistake, when this line was removed (by default QGraphicsItem :: NoCache used) selection It is again prepared again.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -