[Qt-interest] combo box styles
Andre Somers
andre at familiesomers.nl
Thu Sep 2 21:54:00 CEST 2010
Op 2-9-2010 21:31, Duane Hebert schreef:
> "Andre Somers"<andre at familiesomers.nl> wrote in message news:4C7FFB03.9090906 at familiesomers.nl...
>> Op 2-9-2010 21:27, Duane Hebert schreef:
>>> "Andre Somers"<andre at familiesomers.nl> wrote in message news:4C7FF58A.7010904 at familiesomers.nl...
>>>> Op 2-9-2010 18:33, Duane Hebert schreef:
>>>>> I have a touch screen app and I want to set the style of the scroll up and scroll down arrows of the combo
>>>>> box. The ones that appear when the drop down is shown and the contents exceed the size. I need to make them
>>>>> larger. But which style are these?
>>>> Look into QApplication::setGlobalStrut(). It defines the minimum size for widgets that users interact with.
>>> Thanks André but it seems to work with almost everything except the up/down arrows in the drop down
>>> for the combo box. It does work for the arrows in the initial combo box but I'm talking about the
>>> arrows at the top and bottom of the contents of the combo box.
>> Sounds like a bug in Qt to me. It is supposed to work for *all* controls.
> Actually, it doesn't work for the up/down on the main combo box. But it does work for the combo box itself.
> It works for scroll bar buttons etc. so I could have used that instead of style sheets to achieve that.
> Maybe it's been fixed on a later version. I'm using 4.5.1.
Actually, I think it is just plain broken.
I just tried it with 4.6.2, and there are problems galore. I set a big
strut (30,30), and on my test form the spin box becomes useless (the
down button doesn't fit in the spin box anymore), the up and down arrows
for the list in a combo box only use the width, while the down button
for an editable combo box (to drop the list down) only uses the height.
The buttons on a horizontal scroll bar are also too narrow.
The method is not even marked as depreciated, but I guess it is now
simply being ignored in all the style and style sheet violence. I doubt
any QML widget even looks at at...
Even if the functionality has been superseded by other methods, it is
still a bug that it does not work properly. Issues with it should at
least be noted in the documentation.
André
More information about the Qt-interest-old
mailing list