Is there a better way of creating a contextMenu (a small menu when you right
click) inside a QTreeWidget
than setting the setContextMenuPolicy?  This is what I currently do:

self.treeView = QTreeWidget()
self.treeView.setContextMenuPolicy(Qt.CustomContextMenu)
self.connect(self.treeView,SIGNAL('customContextMenuRequested(QPoint)'),
self.newContext)

But, the problem I'm having is that the right click to bring up the menu,
also changes the selection.
How can I tell the tree to ignore right clicks but still bring up the
contextmenu?  Oh, and as a side
question.  How can I get a list of the QTreeWidgetItems that make up the
tree?  I saw items() but I
didn't quite understand how to set the QMimeData type (I'm sorry, I'm a bit
new to QT :( )  Thank you!

B
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to