Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Scroll Bar diretion for RTL languarges
Forum Update on Monday, May 27th 2025

Scroll Bar diretion for RTL languarges

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 2 Posters 713 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.
  • V Offline
    V Offline
    Volker D
    wrote on last edited by
    #1

    Hallo,

    i am using Qt Widgets. They have scrollbars and it works fine as long as the languarge is right to left.
    Now i got a report from an arabic user. The whole interface is set to Left to Right of course.
    But he complains, that the scroll bars work incorrect.
    His exact report is:
    "the buttons of the horizontal scroll bar are reversed, when you click on the right direction button the content scrolls to the left, and vice versa. here is a link to a scren record

    https://drive.google.com/file/d/1HSC5Lv1QVv2GpLoToqEMUzxFe5uHD0d2/view?usp=drivesdk
    "

    Anyone here with an idea how i can fix that? Or is it a Qt bug?

    Thank you very much for your help.

    Christian EhrlicherC 1 Reply Last reply
    0
    • V Volker D

      Hallo,

      i am using Qt Widgets. They have scrollbars and it works fine as long as the languarge is right to left.
      Now i got a report from an arabic user. The whole interface is set to Left to Right of course.
      But he complains, that the scroll bars work incorrect.
      His exact report is:
      "the buttons of the horizontal scroll bar are reversed, when you click on the right direction button the content scrolls to the left, and vice versa. here is a link to a scren record

      https://drive.google.com/file/d/1HSC5Lv1QVv2GpLoToqEMUzxFe5uHD0d2/view?usp=drivesdk
      "

      Anyone here with an idea how i can fix that? Or is it a Qt bug?

      Thank you very much for your help.

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      @Volker-D said in Scroll Bar diretion for RTL languarges:

      Anyone here with an idea how i can fix that? Or is it a Qt bug?

      First you should start with a minimal, compilable example and then what exact Qt version you're using. Then you can also search the bug reports for such a problem.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Volker D
        wrote on last edited by Volker D
        #3

        Thank you. It happen with every QTableWidget.
        I didn't have done special stuff. Only adding items and setting the QApllication to RTL.
        I didn't modify the scoll bars. It is all default. I am using Qt 6.5. In fact the problem looks like the icons of the scrool bar are swaped, but i didn't swaped them. Looks like they are swapped by QApllication RTL, but of course that is needed, since all other stuff must be changed from LTR to RTL, but of course not the icons of the Qt Scrool bars.
        hmm...

        Christian EhrlicherC 1 Reply Last reply
        0
        • V Volker D

          Thank you. It happen with every QTableWidget.
          I didn't have done special stuff. Only adding items and setting the QApllication to RTL.
          I didn't modify the scoll bars. It is all default. I am using Qt 6.5. In fact the problem looks like the icons of the scrool bar are swaped, but i didn't swaped them. Looks like they are swapped by QApllication RTL, but of course that is needed, since all other stuff must be changed from LTR to RTL, but of course not the icons of the Qt Scrool bars.
          hmm...

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          This looks like a problem with the windowsvista style. Works fine for fusion or windows. Need to take a look into it.
          Can't test it with latest Qt5 though to see if it's a regression.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          Christian EhrlicherC 1 Reply Last reply
          1
          • Christian EhrlicherC Christian Ehrlicher

            This looks like a problem with the windowsvista style. Works fine for fusion or windows. Need to take a look into it.
            Can't test it with latest Qt5 though to see if it's a regression.

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Can you test it with Qt6.4 somehow? I'm pretty sure it's working correctly there.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • V Offline
              V Offline
              Volker D
              wrote on last edited by Volker D
              #6

              ahh... Yes. You are right. This bug happen only with default windowsvista style. Fusion style and windows style are fine.
              I also checked Qt 5.15.10. It is fine there always!

              So it is a Qt bug. I will check Qt 6.4 later. I must do other stuff now.

              So i should write a bug report, didn't I?

              Christian EhrlicherC 1 Reply Last reply
              0
              • V Volker D

                ahh... Yes. You are right. This bug happen only with default windowsvista style. Fusion style and windows style are fine.
                I also checked Qt 5.15.10. It is fine there always!

                So it is a Qt bug. I will check Qt 6.4 later. I must do other stuff now.

                So i should write a bug report, didn't I?

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Volker-D said in Scroll Bar diretion for RTL languarges:

                So i should write a bug report, didn't I?

                No need for it: https://bugreports.qt.io/browse/QTBUG-116224

                If you compile Qt by yourself you can also try my fix shortly.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                2
                • V Offline
                  V Offline
                  Volker D
                  wrote on last edited by
                  #8

                  You are right. The bug isn't present in Qt 6.4.3.

                  You are awesome! I saw you already added a patch. Fixing a bug in a few minutes on a Saturday. You are genius.
                  Thank you!
                  I won't compile Qt myself. So i will wait for the next Qt release. Not critical, since i told the arabic user the swap to fusion or windows mode (we luckly added that feature already some time ago.)

                  hmm... Are you so genius and can you also fix an other problem that the arabic users complains about?
                  It is this old bug (I reported it alread +10 years ago). Sadly still available in Qt 6.5.2:
                  https://bugreports.qt.io/browse/QTBUG-25186

                  Christian EhrlicherC 1 Reply Last reply
                  0
                  • V Volker D

                    You are right. The bug isn't present in Qt 6.4.3.

                    You are awesome! I saw you already added a patch. Fixing a bug in a few minutes on a Saturday. You are genius.
                    Thank you!
                    I won't compile Qt myself. So i will wait for the next Qt release. Not critical, since i told the arabic user the swap to fusion or windows mode (we luckly added that feature already some time ago.)

                    hmm... Are you so genius and can you also fix an other problem that the arabic users complains about?
                    It is this old bug (I reported it alread +10 years ago). Sadly still available in Qt 6.5.2:
                    https://bugreports.qt.io/browse/QTBUG-25186

                    Christian EhrlicherC Offline
                    Christian EhrlicherC Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @Volker-D said in Scroll Bar diretion for RTL languarges:

                    Thank you!

                    It was pure luck this time - the reason was easy to find :)

                    I'll take a look into the other one if I find some time.

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    1 Reply Last reply
                    0
                    • V Volker75 referenced this topic on

                    • Login

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