I'm using QT Creator to develop an application. I have two QTListWidgets which are aligned side by side.
I've populated the first qtlistwidget with some items using开发者_高级运维 the 'Edit List Widget' dialogue box.
Now based on which item is selected in the first qtkistwidget , I would like to have options in the second qtlistwidget. These options in the second qtkistwidget should change with a change of selection in the first one .
Thanks in advance
I would recommend looking at QStringListModel
and using QTreeView
s for your views. Keep a collection of the models to use in the second view, and set the model appropriately when the first view's selection changes.
精彩评论