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. Changing resolution at run time by qt app
Forum Updated to NodeBB v4.3 + New Features

Changing resolution at run time by qt app

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 4 Posters 8.2k 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.
  • R Offline
    R Offline
    raghavendraLN
    wrote on last edited by
    #1

    Hi,
    Hay anybody can tell me how to use QScreen with an example.By which i wanted to change resolution of qt app at run time.
    Thanks in advance

    1 Reply Last reply
    0
    • R Offline
      R Offline
      raghavendraLN
      wrote on last edited by
      #2

      Hi,
      I wanted to switch from LCD (320X240) to VGA(800x600) after clicking a button in my qt app.The target is IMX-31.I tried with
      system("echo U:800x600p-60 > /sys/class/graphics/fb0/mode");
      after clicking vga button.
      If i cat my fb i am getting 800x600,but screen is not appearing properly on vga.
      Can anybody help me..?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        moderator note:
        I merged your two topics, as they are on the same issue. Please stick to a single topic for an issue.

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qtd1d1
          wrote on last edited by
          #4

          Did you try the fbset command?

          @fbset -g 320 240 320 240 32 -fb /dev/fb0@

          Try this.. but propably you will need to set the timings with the -t parameter.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            raghavendraLN
            wrote on last edited by
            #5

            Hi,

                    fbset -g didn't work out.And i tried with -t option also.But it also didn,t work ou.Any other way..?
            
            1 Reply Last reply
            0
            • Q Offline
              Q Offline
              qtd1d1
              wrote on last edited by
              #6

              Search in google for the pdf of the VESA display standard document. It contains everything you need for display timings. I don't know how much you know about timings (I'm not an expert) but it's complicated. In my project it took me 3 days to set the video output to 1440x900 with the correct timings. If theres something wrong with the timings it won't work...

              If it still doesn't work you have to check which framebuffer your application is using.
              A simple way to do this is (your application should run during the check):
              @cat /dev/fb0@

              try this from fb0 to fb2.
              You will recognize the right framebuffer when u see wired symbols on the commandline.

              When you know which framebuffer is used, you have to modify your fbset command
              @fbset -g ... -t ... -fb /dev/fbX@
              X is the value for the valid framebuffer.

              1 Reply Last reply
              0
              • Q Offline
                Q Offline
                qtd1d1
                wrote on last edited by
                #7

                To calculate the timings there's actually a tool called universal modeline calculator. It calculates you the timings you need for fbset from a X11 modeline specification.

                I found it for you:

                Modeline "320x240" 15.75 320 336 384 400 240 244 246 262

                Download the UMC "here":http://umc.sourceforge.net/
                Install it and use it to calculate your fbset timings using the Modeline "320x240" ...

                With the correct framebuffer it should work

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  atluft
                  wrote on last edited by
                  #8

                  Did anyone figure this out?

                  How at runtime can an embedded QT app change the QWS screen resolution?

                  If QT app is running (say as a QWS server) and the display resolution is changed from 1080p to 720p (by fbset or by switching displays or by user choice) then how should a QT application respond to paint itself correctly?

                  Today, after resolution changes it appears that QT continues to paint the original resolution (and I am not sure why it would change since nobody told it that the framebuffer has changed). The issue of how QT app knows resolution changed aside. What are the mechanics of writing to the framebuffer using the new and correct resolution values returned by the ioctl FBIOGET_VSCREENINFO?

                  Restarting the entire application works. How about something more subtle?

                  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