[PyQt] problem with QTableView.selectionChanged

Bastian Venthur venthur at debian.org
Sun Oct 12 22:55:54 BST 2008


Hi,

how can I catch a selectionChanged signal from a tableView? I tried:

QtCore.QObject.connect( self.tableView,
  QtCore.SIGNAL('selectionChanged(const QItemSelection&,
                                  const QItemSelection&)'),
  self.selection_changed)

but selection_changed never gets called. I what that selection changed
is always called when the user changes the selection (ExtendedSelection).

QtCore.QObject.connect(self.tableView, QtCore.SIGNAL("activated(const
QModelIndex&)"), self.activated)

works though, but It just fires on double-clicks of a selection and is
just for one item. But I need the ExtendedSelection.

Any hints?


Cheers,

Bastian



More information about the PyQt mailing list