PDA

View Full Version : Maybe a bug from Qt : Impossible to change the height of QToolBarExtension



Alundra
31st March 2017, 21:27
Hi,
Maybe a bug found in Qt, doing that the height doesn't change.


QToolBarExtension
{
height: 19px;
}

Changing the background color works correctly but the height is impossible to change.
Bug from Qt or bad use ?
Thanks

high_flyer
1st April 2017, 21:56
It has been a long time since I have worked with Qt Stylesheets, but as far as I can remember only the specified Types are supported and I don't see QToolBarExtention in there:
http://doc.qt.io/qt-5/stylesheet-reference.html
QToolBar however is supported, have a look at the Stylesheet foc for QToolBar maybe it will give you a clue what you can do in your case.
Or maybe you should use QToolBarButton as a selector.
Or I found this link, maybe it can bring you further:
https://forum.qt.io/topic/237/how-can-i-style-a-qtoolbar-extension-button-icon-via-css/4

Alundra
2nd April 2017, 03:21
I only wanted to reduce the size of the qtoolbar extension (arrow button) which is visible when the toolbar is too short to show all items in the toolbar.
All works good but this button is 2px too tall than the qtoolbar height which gives a render issue.
Maybe a bug on the calcule of the height of this button.
But the point is it's impossible to change the height.