View Full Version : Whenever a cell in QTableView is selected, an unrelated QPushButton gains focus too

4th November 2014, 20:55
I have a QTabWidget, that on a particular tab holds a QTableView subclass and a QHBoxLayout of QPushButtons (Insert, Delete, Fill/Calc, Copy, Paste).


The red circles show that whenever I make a selection in the `QTableView`, the `Insert` button also gains selection.


As a result, when the user types into the Segment Name line edit and hits enter (to submit the changes), the changes are submitted *and the insert button is activated*.

What can I do to make the QTableView cells and the Insert button mutually exclusive for selection?

In other words, when a user clicks on a table cell I do not want any buttons to also be selected.