Solved Selecting two rows in two different TableView
-
Hi,
I have a frame with two different QTableView displaying the same data.
I want the user to select one row of each tableview and then press a button.The problem is that when i select the row in the second tableview, the first one become gray (and i need to keep it blue for the visibility).
The problem is the same when i click a QCheckBox or anything else in the frame.I hope I was clear in explaining my problem.
Thx
-
Hi
The reason the first one becomes grey is that it loses focus.
Only 1 (one) widget can have focus. So there is no way, they both can be blue pr default.
Its per design (for OS). if user clicks on other widget, it gets the focus.So all applications does this, so are u sure u need to alter that?
-
Yes because the user need to clearly identify wich rows are selected.
-
@Zoptune
well
You might be able to change the color of the Selected, but not active state
using a delegate.http://www.qtcentre.org/threads/21482-Change-appearence-of-selected-row-in-QTableView
-
@mrjj
What about using stylesheets for this? -
-
@the_
of cause :)
much easier than delegate.
Good thought :)