Combo box max visible items

Find and share HowTos to various installations / configurations!
Search

Post Reply
2 posts • Page 1 of 1
yasas@applied.co.uk
Posts: 21
Joined: Wed Sep 21, 2016 12:26 pm

Combo box max visible items

Post by yasas@applied.co.uk »

Hi,
How can I get the combo box to display more than 10 items (without scrolling) in the dropdown?

Thank you

User avatar
hpuchegger
Posts: 86
Joined: Fri Oct 08, 2021 10:38 am

Re: Combo box max visible items

Post by hpuchegger »

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

Post Reply
2 posts • Page 1 of 1