[PyQt] Python QT query

Martin Airs camberwell at gmail.com
Tue Jul 20 13:12:13 BST 2010


Good Day all,

I have a little problem I hope somebody can shed some light on, In the
attached python script I have set up a QGraphicsScene and added a couple
of items to it, then I set the items flags to ItemIsSelectable.

imagine this as a kind of buddy list type thing, when an item is
selected the item is animated and the text turns blue. however when I
right click to bring up my context menu it seems to select none. when
the item is blue and selected I'd like to just be able to right click on
it and show my context menu without having to reselect it in my
contextMenuEvent with item.setSelected(1).

the program is small so one can try it and see, I just don't want it to
animate on right click basically (unless it is actually being selected).

Thanks in advance

Martin


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: graphicstest.txt
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100720/c84357e7/attachment.txt>


More information about the PyQt mailing list