QssStylesheetEditor icon indicating copy to clipboard operation
QssStylesheetEditor copied to clipboard

What is the setMaxVisibleItems qss code of combox?

Open arilink-tech opened this issue 2 years ago • 1 comments

I try to use qss to set the number of items displayed by combox, but there is no corresponding code. There is no corresponding prompt when using your tool.

arilink-tech avatar Dec 09 '21 08:12 arilink-tech

box.setMaxVisibleItems(5)   #method for combobox to set the max visible items,it should be invoked in python code.
box.setStyleSheet("QComboBox{combobox-popup:0;}")  #the code in " " could be added to qss file

hoping this helps

hustlei avatar Dec 22 '21 13:12 hustlei