QTableView click & doubleClick signals don’t work
-
wrote on 21 Mar 2013, 09:44 last edited by
I'm trying to make my application to respond to user selecting the QTableView row and perform some furter actions, based on the
row selected. Everything works fine with the signal activated. It is fired when key ENTER is pressed on the selected row(on Windows). But I'd like
table to respond also to mouse clicks. For some reason it doesn't work. Please see the connects bellow:// table_m is QTableView, it shows data from the model in GUI, works fine
connect(table_m, SIGNAL ( activated(const QModelIndex&)), this, SLOT ( RowSelected(const QModelIndex&)));
// this works fine, slot function is called when key ENTER is pressed, I get correct index in the argument passedconnect(table_m, SIGNAL ( clicked(const QModelIndex&)), this, SLOT ( RowSelected(const QModelIndex&)));
// this does not work ! Please help.connect(table_m, SIGNAL ( doubleClicked(const QModelIndex&)), this, SLOT ( RowSelected(const QModelIndex&)));
// this does not work either ! -
wrote on 27 Mar 2013, 11:14 last edited by
The above code works as expected for a test example. Can you share more deails about your implementation.
1/2