QTableView emits double click signal twice
-
I'm trying to connect to the double click signal from a QTableView and act on it, which works as expected. I can execute my behavior as I need it. However, the signal is emitted twice for some reason, which is not what I want.
All I'm doing is:connect(ui->tableView, &QAbstractItemView::doubleClicked, this, &Receiver::on_tableView_doubleClicked);
Nothing else is interacting with the double click slot, since I specifically added it and nothing else is connected to the double clicked signal as far as I'm aware.
Qt Version is 5.13.
Insight is appreciated.
-
I'm trying to connect to the double click signal from a QTableView and act on it, which works as expected. I can execute my behavior as I need it. However, the signal is emitted twice for some reason, which is not what I want.
All I'm doing is:connect(ui->tableView, &QAbstractItemView::doubleClicked, this, &Receiver::on_tableView_doubleClicked);
Nothing else is interacting with the double click slot, since I specifically added it and nothing else is connected to the double clicked signal as far as I'm aware.
Qt Version is 5.13.
Insight is appreciated.
@philfors said in QTableView emits double click event twice:
All I'm doing is:
on_tableView_doubleClicked()
This slot is named so that the (stupid) auto-connect feature kicks in and does an automatic connection. Rename the slot.
-
-
@philfors said in QTableView emits double click event twice:
All I'm doing is:
on_tableView_doubleClicked()
This slot is named so that the (stupid) auto-connect feature kicks in and does an automatic connection. Rename the slot.
@Christian-Ehrlicher Yep that sure did it, thank you!
Still new in Qt and learning the ropes.