Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. strange behaviour in hight DPI resolution
Qt 6.11 is out! See what's new in the release blog

strange behaviour in hight DPI resolution

Scheduled Pinned Locked Moved Solved Qt for Python
pyside2
12 Posts 2 Posters 2.1k Views 2 Watching
  • 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.
  • F Offline
    F Offline
    Fakhreddine
    wrote on last edited by
    #1

    Hello, I use PySide2 version 5.15.2.1
    When I ran the app on hight dpi resolution the app open but I can't do anything. I have a strange cursor that not click. scale.png

    PS : I have added lignes for scale :

    if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'):
    QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)

    if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
    QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)

    Thank you in advence !

    current project : www.synalex.com . Medical sofware

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What kind of device is that ?
      Which OS are you running ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        What kind of device is that ?
        Which OS are you running ?

        F Offline
        F Offline
        Fakhreddine
        wrote on last edited by Fakhreddine
        #3

        Hi @SGaist , Thank you :)

        The os is windows (tested on10 and 11). and I tried on multiples devices with hight DPI (when scale is more than 125%).

        For example a dell XPS 13" 3840x2160 (250% Scale).

        current project : www.synalex.com . Medical sofware

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Do you have the same issue with PySide6 ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • F Offline
            F Offline
            Fakhreddine
            wrote on last edited by
            #5

            I didn't try with pyside6. The project is heavy this will teak time to port it.

            current project : www.synalex.com . Medical sofware

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Before doing such a port, you could try with a dummy application that exhibits this behaviour.

              Note that the port should mostly be straightforward. It was one of the goal of Qt 6: to be a "boring" upgrade.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              F 1 Reply Last reply
              1
              • SGaistS SGaist

                Before doing such a port, you could try with a dummy application that exhibits this behaviour.

                Note that the port should mostly be straightforward. It was one of the goal of Qt 6: to be a "boring" upgrade.

                F Offline
                F Offline
                Fakhreddine
                wrote on last edited by
                #7

                @SGaist said in strange behaviour in hight DPI resolution:

                Before doing such a port, you could try with a dummy application that exhibits this behaviour.

                Note that the port should mostly be straightforward. It was one of the goal of Qt 6: to be a "boring" upgrade.

                Yes you are right @SGaist I will do. Thanks a lot !

                current project : www.synalex.com . Medical sofware

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  Fakhreddine
                  wrote on last edited by
                  #8

                  Hello,

                  I found the problem. It's because I use qtwinextra to custumize the window control bar.

                  The problem is solved.

                  current project : www.synalex.com . Medical sofware

                  1 Reply Last reply
                  1
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by SGaist
                    #9

                    Glad you found out !

                    What did you do to fix it ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    F 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Glad you found out !

                      What did you do to fix it ?

                      F Offline
                      F Offline
                      Fakhreddine
                      wrote on last edited by
                      #10

                      @SGaist Nothing sepacial, back to normal windows control bar.

                      cap login.png

                      Now I have to find away to control the bar color.
                      Any idea please ? I read that this can be done using win32api but I don't find yet how to implement this using python/pyside.

                      Thank you

                      current project : www.synalex.com . Medical sofware

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        I haven't used it but maybe the pywin32 module might allow to do that.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        F 1 Reply Last reply
                        1
                        • SGaistS SGaist

                          I haven't used it but maybe the pywin32 module might allow to do that.

                          F Offline
                          F Offline
                          Fakhreddine
                          wrote on last edited by
                          #12

                          @SGaist ok merci :)

                          current project : www.synalex.com . Medical sofware

                          1 Reply Last reply
                          1

                          • Login

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