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. Correcting non-square pixels application-wide
Forum Updated to NodeBB v4.3 + New Features

Correcting non-square pixels application-wide

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 697 Views 1 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    My application (also) runs on screens that have non-square pixels. Suddenly, a circle is an ellipse, a square is a rectangle, and it all looks pretty stupid.

    I am looking for ideas on how I can fix that, if possible in an application-wide fashion. Something that would ideally stretch the whole Qt application (Widgets, GraphicsView, QML) by a factor to account for the hardware.

    I pretty much know I can do in GraphicsView whatever I want, but it would leave all Widget and QML parts aside. I'd prefer something that works on a more global level.

    jsulmJ 1 Reply Last reply
    0
    • A Asperamanca

      My application (also) runs on screens that have non-square pixels. Suddenly, a circle is an ellipse, a square is a rectangle, and it all looks pretty stupid.

      I am looking for ideas on how I can fix that, if possible in an application-wide fashion. Something that would ideally stretch the whole Qt application (Widgets, GraphicsView, QML) by a factor to account for the hardware.

      I pretty much know I can do in GraphicsView whatever I want, but it would leave all Widget and QML parts aside. I'd prefer something that works on a more global level.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Asperamanca Are you sure the problem is "non-square pixels" and not simply wrong resolution configured? You also did not say what screen/device that is.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Asperamanca Are you sure the problem is "non-square pixels" and not simply wrong resolution configured? You also did not say what screen/device that is.

        A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        @jsulm In this case it's an industrial touch panel. I take the technical specs as a given...

        jsulmJ 1 Reply Last reply
        0
        • A Asperamanca

          @jsulm In this case it's an industrial touch panel. I take the technical specs as a given...

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Asperamanca Are you sure you configured the correct resolution?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Asperamanca
            wrote on last edited by Asperamanca
            #5

            I checked the specs. Native resolution is 800x480, Active screen area is 154,08x85,92 mm. That means a single pixel has a size of 0,1926 x 0,179 mm

            I could try to set a resolution of 861x480 px in the operating system and see whether the driver is able to cope with it...

            A 1 Reply Last reply
            0
            • A Asperamanca

              I checked the specs. Native resolution is 800x480, Active screen area is 154,08x85,92 mm. That means a single pixel has a size of 0,1926 x 0,179 mm

              I could try to set a resolution of 861x480 px in the operating system and see whether the driver is able to cope with it...

              A Offline
              A Offline
              Asperamanca
              wrote on last edited by
              #6

              @Asperamanca
              In the end, I simply used the view transformation of GraphicsView to solve this (only for GraphicsView, for now)

              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