Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Sliders and other parts of widgets is too small with Qt5, X11, libxcb - globalstrut only works partly
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 3 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benmao
    wrote on last edited by
    #1

    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 (pvbrowser.org) 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.

    T B 2 Replies Last reply
    0
    • B benmao

      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 (pvbrowser.org) 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.

      T Offline
      T Offline
      Tirupathi Korla
      wrote on last edited by Tirupathi Korla
      #2

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

      B 1 Reply Last reply
      0
      • T Tirupathi Korla

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

        B Offline
        B Offline
        benmao
        wrote on last edited by
        #3

        @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.

        1 Reply Last reply
        0
        • B benmao

          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 (pvbrowser.org) 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.

          B Offline
          B Offline
          benmao
          wrote on last edited by benmao
          #4

          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.

          aha_1980A 1 Reply Last reply
          1
          • B benmao

            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.

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @benmao Glad you found the solution.

            So please mark this thread as solved. Thanks.

            Qt has to stay free or it will die.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved