Hi,
How can I get the combo box to display more than 10 items (without scrolling) in the dropdown?
Thank you
Combo box max visible items
Search
- hpuchegger
- Posts: 86
- Joined: Fri Oct 08, 2021 10:38 am
Re: Combo box max visible items
You will have to manage this by using stylesheet e.g.:
QComboBox QAbstractItemView {
margin: 5px;
}
QComboBox QAbstractItemView::item {
margin: 10px; /* Adjust this value to fit more items */
}
To implement this stylesheet in WinCC OA, follow these steps:
1) Save the CSS code in a file named stylesheet.css in the config directory.
2) Start the WinCC OA project/UI manager.
3) All widgets, including the combo box, will now use the defined stylesheet.
Br, Herbert
QComboBox QAbstractItemView {
margin: 5px;
}
QComboBox QAbstractItemView::item {
margin: 10px; /* Adjust this value to fit more items */
}
To implement this stylesheet in WinCC OA, follow these steps:
1) Save the CSS code in a file named stylesheet.css in the config directory.
2) Start the WinCC OA project/UI manager.
3) All widgets, including the combo box, will now use the defined stylesheet.
Br, Herbert