Results 1 to 2 of 2

Thread: two qlistwidgets

  1. #1
    Join Date
    Dec 2008
    Posts
    17
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default two qlistwidgets

    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) ?

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: two qlistwidgets

    you can change a palette for both QListWidgets.
    Qt Code:
    1. ...
    2. QPalette pal = firstListWidget->palette();
    3. pal.setColor(QPalette::Inactive, QPalette::Highlight, pal.color(QPalette::Active, QPalette::Highlight));
    4. firstListWidget->setPalette(pal);
    5. ...
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Drag and drop between QListWidget's
    By estanisgeyer in forum Qt Programming
    Replies: 4
    Last Post: 17th February 2011, 04:29

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.