[PyQt] isColumnHidden problem
Kermit
stef.kermit at gmail.com
Thu Jul 23 14:07:06 BST 2009
hi all,
i've a problem with isColumnHidden
def __setupContextMenu(self):
self.treeView_societe.header().setContextMenuPolicy(Qt.CustomContextMenu)
self.__menu = QMenu(self)
for a in range(len(TabSoc)):
act = QAction(TabSoc[a], self)
act.setCheckable(True)
act.setChecked(not self.treeView_societe.isColumnHidden(a))
act.setData(QVariant(a))
self.__menu.addAction(act)
self.connect(self.treeView_societe.header(),
SIGNAL('customContextMenuRequested(const QPoint &)'),self.__showContextMenu)
self.connect(self.__menu, SIGNAL('triggered(QAction
*)'),self.__ColumnHidden)
in this code self.treeView_societe.isColumnHidden(a) return always false
for information, treeView_societe is my own class :
class SocieteTree(QTreeView):
def __init__(self, parent = None):
print "debut init SocieteTree"
QTreeView.__init__(self, parent)
self.setObjectName("SocieteListing")
where is my mistake ?
thx for your help
Kermit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090723/b47f12d2/attachment.html
More information about the PyQt
mailing list