Important: Please read the Qt Code of Conduct -

Sliders and other parts of widgets is too small with Qt5, X11, libxcb - globalstrut only works partly

  • Is globalStrut only used for the size of the whole widget but not for the subcomponentes, like buttons in sliders, combo boxes etc?

    On my system, the sliders, e.g. for the widget's scroll areas, become bigger if I use setGlobalStrut() accordingly. But a slider has buttons with arrows which are very small on our system. The same is true for QDateWidget. The Buttons with the arrows are very, very small in our system and therefore cannot be well used with touchscreen.

    Is this optimised in later versions of Qt? Or can I adjust the appearance somewhere?

    We use Pvbrowser ( for visualisation of a gas measurement device on an embedded system with touchscreen. It is running an embedded linux yocto/poky "jethroo".
    On that system X11 was used instead of egl because the vnc functionality is needed. A display manager is not used and the windows manager is "matchbox". Qt is version 5.5.1.

  • @benmao
    Try setting QT_SCALE_FACTOR instead.
    export QT_SCALE_FACTOR=2 from command line or ‘’’qputenv(“ QT_SCALE_FACTOR”, “2”);’’’ in main..

  • @Tirupathi-Korla
    It did not work. It seems that it was introduced at Qt 5.6 but I use Qt 5.5.1.

    I will try to test if it would solve the problem. However, the embedded panel is provided with Yocto Jethroo and there it is not easy to change the Qt version without braking dependencies.

  • In the meantime I have found a solution. The screen size was not set in X11 and xrandr reported 0 dpi. If I set the dpi, e.g. by calling "xrandr --dpi 146" from console, the size of arrow elements etc. within dateTime widgets, scroll bars or other are adjusted accordingly when the application is restarted.

    Not only the widgets and its elements are changed but also the font size since it is given in points which depends on dpi.

  • Lifetime Qt Champion

    @benmao Glad you found the solution.

    So please mark this thread as solved. Thanks.

Log in to reply