PDA

View Full Version : QTableView activated signal not called



mpi
17th February 2012, 09:27
Hi,

I have a QTableView. If I connect to the signal 'void activated(const QModelIndex & index)', the method I connect to is not called, when I double-click, single-click, enter by tab, enter by space-press etc.

However, if I connect to the signal 'void doubleClicked(const QModelIndex & index)', my method does get called when I double-click a table cell.

Am I misunderstanding the meaning of the 'activated' signal or doing something else wrong.

Best regards

Spitfire
20th February 2012, 16:21
This signal is emitted when the item specified by index is activated by the user. How to activate items depends on the platform; e.g., by single- or double-clicking the item, or by pressing the Return or Enter key when the item is current.
Select an item and press enter to activate it.
If you disable editing ( table->setEditTriggers( QAbstractItemView::NoEditTriggers ); ) then double-click also activates the item.

Alir3z4
20th February 2012, 16:29
Signals names on the QTable{Widget,View} always make me confuse, everytime it force me to assistant[ROCKS] !