Changing resolution at run time by qt app
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
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..?
I merged your two topics, as they are on the same issue. Please stick to a single topic for an issue.
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.
fbset -g didn't work out.And i tried with -t option also.But it also didn,t work ou.Any other way..?
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):
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.
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
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?