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
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt