[Qt-interest] selection color chnage
Sean Harmer
sean.harmer at maps-technology.com
Tue Mar 3 14:08:33 CET 2009
Hi,
On Tuesday 03 March 2009 12:59:08 Sujan Dasmahapatra wrote:
> Friends I have a QGraphicsItem what I have made that the
> ItemIsSelectable but when I am selecting the item the color is not
> changing. I want the color of the item to be yellow on selection.How
> could I achiveve this can anyone help me plss ??????????
Put a test into your paint() function overload (isSelected()) and draw the
object as yellow if the item is selected. QGraphicsItem does not magically
know how to draw your item differently in its selected state.
Sean
More information about the Qt-interest-old
mailing list