PDA

View Full Version : Qt handling of Linux framebuffer resizing



trevanian
18th October 2015, 22:26
Hello,

I am designing a Qt embedded (Boot to Qt) app, which renders directly to the Linux framebuffer. It is possible that the screen resolution or orientation of the device may change at run-time. This change is initiated by an external app, or the user rotating the device. How will the Qt framework handle the underlying framebuffer change in resolution/orientation? Is there a way to refresh the screen without having to restart my app, following a change in resolution?

Thank you!

anda_skoa
22nd October 2015, 18:07
That will most likely depend on the QPA you are using.

Qt does allow QPAs to do that, resolution or orientation changes can be signalled through the QScreen API.

Cheers,
_

trevanian
2nd December 2015, 08:18
Thank you for the follow up. I reviewed a bit of documentation and QPA code and I also found the following training video useful: https://www.youtube.com/watch?v=qCWWxBf6vko.
I agree that QScreen signals can provide the trigger to update the screen. However, what I haven't found out so far is how to initiate a complete refresh of all widgets and graphical elements, so that the contents of the frame buffer match the new screen resolution.

Cheers!