How can I set the enabled property of a row of a QComboBox
? I want it to have some disabled and some enabled rows.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- QML: Cannot read property 'xxx' of undefin
- How to get the background from multiple images by
- Evil ctypes hack in python
Here is a working example of a QComboBox, where items 1 and 4 (as specified in the list
disable
) are disabled. I used this example. See also the documentation for the setData method.Add each
QComboBox
from a row to a list, then work through the list setting the state.Based on this answer, we can simplify Junuxx's answer to :