PDA

View Full Version : How to highlight the items inside the QListwidget???



Choti
9th February 2016, 11:21
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.

wysota
9th February 2016, 14:18
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.

Choti
9th February 2016, 15:06
Hello Mr.Wysota,

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