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

Disable the combo box specific item



  • Is there a way to disable a specific item in the combo box?

    For example, there is a combo box containing items from 1 to 5. I want to limit the items that can be selected according to the permission


  • Lifetime Qt Champion

    Hi,

    What comes to mind:

    The first avoids to show "invalid values" to your user (asking why can't I select them ?).
    The second should do what you original want at the risk of your users wondering why there are unelectable items in a control which should offer them only valid choices.


  • Lifetime Qt Champion

    Hi,

    What comes to mind:

    The first avoids to show "invalid values" to your user (asking why can't I select them ?).
    The second should do what you original want at the risk of your users wondering why there are unelectable items in a control which should offer them only valid choices.


Log in to reply