[PyQt] Qt::DisplayRole

Mark Summerfield mark at qtrac.eu
Mon Jul 2 15:07:31 BST 2007


On 2007-07-02, Vladimir Pouzanov wrote:
> Hi all,
>
> I'm looking for Qt::DisplayRole, it seems not to be in Qt:
> from PyQt4 import QtCore, QtGui, Qt
> Qt.DisplayRole
>
> <type 'exceptions.AttributeError'>        Traceback (most recent call last)
> /home/farcaller/<ipython console> in <module>()
> <type 'exceptions.AttributeError'>: 'module' object has no attribute
> 'DisplayRole'
>
> Any hints?

>>> import PyQt4.QtCore
>>> hasattr(PyQt4.QtCore, "Qt.DisplayRole")
False
>>> hasattr(PyQt4.QtCore.Qt, "DisplayRole")
True
>>> from PyQt4.QtCore import *
>>> Qt.DisplayRole
0
>>> Qt.EditRole
2

-- 
Mark Summerfield, Qtrac Ltd., www.qtrac.eu



More information about the PyQt mailing list