Hi!

I guess that is a stupid question, but I was never able to understand binary
operators.  And now I'm stuck with this:

 

 

class MyModel(QAbtractItemModel):

      :

def flags(index):

      if index.isValid() and whatever:

return Qt.ItemIsEditable|Qt.ItemIsEnabled|Qt.ItemIsSelectable #that is one
problematic return value

 

Now I need to know, if an item at a given index is editable. I get the
return value from model.flags(index), but how can I know if

Qt.ItemIsEditable is actually in there somewhere, inside this
Qt.ItemIsEditable|Qt.ItemIsEnabled|QtItemIsSelectable value? Thanks!

_______________________________________________
PySide mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to