Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QApplication::processEvents timing
Forum Updated to NodeBB v4.3 + New Features

QApplication::processEvents timing

Scheduled Pinned Locked Moved Unsolved General and Desktop
openglqapplicationmain loop
1 Posts 1 Posters 945 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.
  • Z Offline
    Z Offline
    Zouch
    wrote on last edited by
    #1

    Hi guys,
    We are using Qt for a visualization engine viewer, and we are having issues with the QApplication::processEvents() method.
    Since we needed to control the framerate (in a game loop fashion), we overrided the QApplication to define our own and our game loop that looks like

    MainApplication app;
    // Some code here
    while (true) {
        app.processEvents();
        app.doFrame();
        // sync code, nothing for now
    }
    

    This works fine, timing are about 0.001s for the processEvents() call, while, for an empty scene, the doFrame() takes about 0.0001s.
    Now, we have a problem when we double click on title bar (to maximize the window). Indeed, after doing that, processEvents() call, goes from about 0.001s to about 0.01s (*10). Is this a known issue when using QtOpenGLWidget ? (most of the time seems to be taken in QPlatformBackingStore::composeAndFlush())

    Thanks

    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