[Interest] Setting QTableWidgetItem's selected color when table is inactive

Murphy, Sean smurphy at walbro.com
Thu Sep 8 16:49:57 CEST 2016


I'm setting up a dialog that presents two side-by-side tables to the user, allowing the user to match an item from table A with an item from table B. I'm trying to figure out how to get both tables to use the active item selection color, regardless of which table currently has focus.

For example, dialog opens up with both tables populated, but no items selected on either table, so initially all items in both tables have a white background. User clicks on an item in table A, that item now has a blue background, all other items in both tables have white backgrounds. User then clicks on an item in table B. At this point the newly clicked item in table B has a blue background, but the item in table A now has a grey background. I'd like for both selected items on both tables to retain the active blue color instead of one of them having a grey background.

Sean


More information about the Interest mailing list