PDA

View Full Version : two qlistwidgets



msmihai
8th January 2009, 14:52
Hello again :)
I have on my window 2 QListWidgets . I want to select an item from the first List, and then to select another one from the second list.
The problem is that after i select a line from the first list , when i click the second list, the selection from the first list becomes gray. How can i avoid this so that both selections are blue ? ( as they should be) ?

spirit
8th January 2009, 15:00
you can change a palette for both QListWidgets.


...
QPalette pal = firstListWidget->palette();
pal.setColor(QPalette::Inactive, QPalette::Highlight, pal.color(QPalette::Active, QPalette::Highlight));
firstListWidget->setPalette(pal);
...