[PyQt] QTableView header connection
Till Gerken
till.gerken at gmail.com
Wed Mar 18 15:31:11 GMT 2009
On Wed, Mar 18, 2009 at 3:40 PM, Gert-Jan <gj_den_heijer at hotmail.com> wrote:
> Class GUI:
> def __init__(self):
> tableWidget = QtGui.QTableWidget()
> # Code to insert 5 columns and make a horizontal header)
> self.connect(tableWidget.horizontalHeader, QtCore.SIGNAL("clicked()"),
> self.random_function)
>
> def random_function(self):
> print 'ok'
>
> However, double-clicking the header does not make the console print 'ok'.
If you double click, the signal should be doubleClicked().
Till
More information about the PyQt
mailing list