Solved ComboBox: replace arrows
-
Hi!
Is it possible to hide the default up and down arrows?
Actually I can show my own arrow image in the ComboBox. But the default arrows are still visible, too.Kind regards,
Melanie -
Hi! There are two different comboboxes, the older one from Qt Quick Controls 1 and the newer one from Qt Quick Controls 2. Which one do you want to customize?
-
@Wieland : I want to customize the Qt Quick Controls 2 ComboBox.
-
Check the indicator part at https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#customizing-combobox
-
@jpnurmi : Thanks. That was exactly what I was looking for. :)
-
As a side note, I want to mention that using Canvas to draw the arrow is a bit silly and massive overkill. It was used mainly because this way the example snippet is self-contained and can be easily copy-pasted as a working starting point. In real world, most users will hopefully use something lighter, such as, an image. :)
-
@jpnurmi BTW, isn't there a deficiency in that documentation? It doesn't mention "indicator", it just has it in the example. I quickly tried to find something relevant there earlier but didn't find it because I didn't read the example.
-
@Eeli-K Yes, you're right. Thanks for pointing it out. :)