[PyQt] QTableView and clicked signal

Benno Dielmann lists at benno-dielmann.de
Mon Jul 28 09:57:00 BST 2008

Hi Pierre, 

just put in the closing braces in the signal strings and you are there.

QtCore.SIGNAL("clicked(constQModelIndex&)"), self._onClick)

On Monday 28 July 2008 10:15:27 Pierre Chifflier wrote:
| Hi,
| I am trying to display data using a QTableView, and use the clicked and
| doubleClicked signals.
| I tried connecting the signals using several variants from:
| QtCore.QObject.connect(self.tableView, QtCore.SIGNAL("clicked(const
| QModelIndex&"), self._onClick) QtCore.QObject.connect(self.tableView,
| QtCore.SIGNAL("clicked(QModelIndex"), self._onClick)
| But it seems that the signals are never sent when I click on an item.
| Is it possible to use these signals with a QTableView ? I'm not sure if
| they are intercepted by another widget (the item, or the table view
| itself) and, unfortunately, it seems there is no easy way to trace
| signals.
| Any idea ?
| I have attached a very small test script.
| Thanks for your help,
| Pierre

More information about the PyQt mailing list