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. QMainWindow repaint freeze on titlebar mouse press
Forum Updated to NodeBB v4.3 + New Features

QMainWindow repaint freeze on titlebar mouse press

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 938 Views 2 Watching
  • 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.
  • M Offline
    M Offline
    mr.indieperson
    wrote on last edited by mr.indieperson
    #1

    Hello!

    I have a background OpenGL rendering thread, which emits frameUpdated(QImage) signal 60 times per seconds.

    I have a QMainWindow class, which connects this signal with its onFrameUpdated(QImage) slot. In this slot i save a received QImage and call repaint().

    Everything is working good, but when i press on the titlebar of a QMainWindow, repainting is freezed (last QImage frame is stucked), until:

    1. i have released the button;
    2. i have moved the cursor;
    3. about 500ms are expired.

    After this all the stucked frames are painted very quickly and then repainting goes back to 60 FPS.

    So events are stucked, how can i fix this? There is a lot of members in QMainWindow and QWidget, i don't know, what can help.

    P.S.: sorry for my english.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Your english is fine.
      When you grab a window by its caption, some OSes ( windows) will
      suspend all events to the window while being dragged.
      I think its what you are seeing.

      M 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        Your english is fine.
        When you grab a window by its caption, some OSes ( windows) will
        suspend all events to the window while being dragged.
        I think its what you are seeing.

        M Offline
        M Offline
        mr.indieperson
        wrote on last edited by
        #3

        @mrjj oh, ok, so i can't prevent this little freeze when i want to move the window on Windows. Thank you!

        mrjjM 1 Reply Last reply
        0
        • M mr.indieperson

          @mrjj oh, ok, so i can't prevent this little freeze when i want to move the window on Windows. Thank you!

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @mr.indieperson
          Not really. its possible to use native API and intercept the movement and manually try to update but
          since drawing is also suspended, its not easy to work around. (as far as i know)

          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