Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Items of QListWidget are greyed out



  • Hello.

    In my application, i have a widget which contains a QTabWidget composed of two tabs. In the second tab there is a QListWidget. When the first tab is shown, i run a method on the widget corresponding to the second tab in order to populate the list. When i press the second tab, the list items appears, but they are greyed out and i cannot select them.

    Could you explain this?

    Dvassily



  • @Dvassily
    There should be no connection between QListWidget items being unselectable and the fact that you are using a QTabWidget with it on the second tab. So try reducing code/show a minimal example of your issue.



  • @JonB Thank you for you response.

    I finally figured it out, there was a QSplitter surrounding the QTabWidget and i tought i could prevent it from being resize by calling setEnabled(false) directly on it. I found a solution on Stack Overflow : https://stackoverflow.com/a/9224819/10525519 .


Log in to reply