0

Having issue at runtime after changing framebuffer resolution,

I have Qt 5.14.2 running on top of linuxfb platform plugin. My QApplication come up in 1024X768 resolution, then change to 1280x1024 resolution using ioctl call to fbdev. The resolution changed and I can confirm looking at fbset output. The problem I am seeing is that after changing the resolution to 1280x1024 Qt still reports it as 1024X768.

Using code I could resolved that issue and after Qt reported correct resolution also.

QWindowSystemInterface::handleScreenGeometryChange(qApp->screens().first(), 
                     QRect(0,0,xNewWidth,yNewHeight), QRect(0,0,cur_xres,cur_yres));
QWindowSystemInterface::setSynchronousWindowSystemEvents(true);
// Print out resolution from Qt
QRect res = QApplication::desktop()->screenGeometry();
qDebug << "QApplication resolution is now "<< res.width() << "x"<< res.height();

But still screen striding have seen as you can see below screenshot, here

In QT4 code here was handling screen refreshment after framebuffer resolution changes, it was working fine. however in QT5 QWSServer is gone, QPA abstraction layer introduced.

Application works normal after restarting Qt Application.

Done anyone know how to force Qt to refresh/recheck/update the resolution it is reporting ? or what might be missing from Linuxfb plugin to notify Qt that something has changed under the hood?

0 Answers0