Yes, it was quite simple:
public void paint(QPainter painter, QStyleOptionGraphicsItem option,
QWidget widget) {
option.setState(com.trolltech.qt.gui.QStyle.StateFlag.State_None);
super.paint(painter, option, widget);
}
thanks,
Dave
> Dawid Sip wrote:
>> Hi,
>> I use different GraphicsItems in my application and some of them are
>> selectable. Now when i select, say a polygon a bounding box shows up
>> surrounding this polygon. I have my own way of showing to the user
>> that some Item was selected so I dont need this bounding box to
>> additionaly show-up. How do I turn it of?
>
> The default paint() of QGRaphicsPolygonItem will draw the selection
> when the state flag State_Selected is set. If you want to disable it,
> the best option is probably to reimplement the paint function and
> unset the state flag, then call the base class' paint function.
> Alternativly, just do a custom paint that simply draws the polygon.
>
> best regards,
> Gunnar
>
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest