Results 1 to 3 of 3

Thread: How to highlight the items inside the QListwidget???

  1. #1
    Join Date
    Jan 2016
    Posts
    22
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to highlight the items inside the QListwidget???

    Hello Everyone,

    I am using two listwidgets inorder to get the keys and values from the server. So, one listwidget is using for getting the keys and other listwidget for getting the values. Once I get the keys and values, I want to highlight the keys and values I mean when I click on the a particular its corresponding value should get highlighted in the other listwidget. I have implemented something in which it highlights only particular key or particular value but not as a pair. So I want to highlight the key and value pair.


    When ever I click on key the corresponding value should get highlighed simililarly when I click on value its corresponding key should get highlighted.


    Thank you.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to highlight the items inside the QListwidget???

    Connect to the selectionChanged signal of the item selection model and update the selection model of the other view to match what is selected in the first view.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2016
    Posts
    22
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to highlight the items inside the QListwidget???

    Hello Mr.Wysota,

    If you dont mind, can you elaborate your answer? I did not understand it properly

Similar Threads

  1. Replies: 3
    Last Post: 11th June 2013, 20:10
  2. Replies: 2
    Last Post: 1st April 2011, 09:32
  3. disabling highlight effect for qlistwidget items
    By sushmacr in forum Qt Programming
    Replies: 8
    Last Post: 5th April 2010, 16:53
  4. QListWidget syntax highlight
    By Ken_Afford in forum Qt Programming
    Replies: 1
    Last Post: 22nd January 2010, 15:54
  5. Hover and Highlight QTable and QTree Items
    By VireX in forum Qt Programming
    Replies: 41
    Last Post: 18th May 2007, 21:55

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
  •  
Qt is a trademark of The Qt Company.