[PyQt] compare EditTriggers

Mads Ipsen mpi at comxnet.dk
Fri Feb 6 13:40:50 GMT 2009


Suppose I say

tree_view = QTreeView()
tree_view.setEditTriggers(QAbstractItemView.DoubleClicked |
QAbstractItemView.SelectedClicked)

Then I can query the flags I just set by calling

triggers = tree_view.editTriggers()

But how do I test that the flags that I just have set actually are the ones
returned in the triggers variable above?

Doing 

triggers == (QAbstractItemView.DoubleClicked |
QAbstractItemView.SelectedClicked)

returns False. I must be doing something wrong here.

Mads


More information about the PyQt mailing list