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. QT5 Application Screen not refreshing after resolution change through Linux framebuffer.
Forum Updated to NodeBB v4.3 + New Features

QT5 Application Screen not refreshing after resolution change through Linux framebuffer.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 361 Views
  • 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.
  • K Offline
    K Offline
    Kishan Mandaliya
    wrote on 20 Sept 2022, 14:47 last edited by Kishan Mandaliya
    #1

    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 below 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,

    6c7b8a09-bd0f-4791-a8ff-4ded61a0e2da-screen image1.png

    In QT4 below code was handling screen refreshment after changing fbdev resolutions, it was working fine. However in QT5 QWSServer is gone, and QPA abstraction layer introduced. What is replacement for blow code in QT5?

    QScreen *screen = QScreen::instance();
    screen->disconnect();
    screen->connect(/dev/fb0);
    QWSServer *qwsserver =  QWSServer::instance();
    qwsserver->refresh();
    

    Application works normal after restarting QT Application.

    Does anyone help how to force Qt to refresh/recheck/update the resolution it is reporting? Or what might be missing from the linuxfb plugin to notify Qt that something has changed under the hood?

    1 Reply Last reply
    0

    1/1

    20 Sept 2022, 14:47

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved