Freezing at QDrag::exec() on windows



  • hi i would like to ask if somebody knows of a workaround for this problem:

    On Windows, the Qt event loop is blocked during the operation. However, QDrag::exec() on Windows causes processEvents() to be called frequently to keep the GUI responsive. If any loops or operations are called while a drag operation is active, it will block the drag operation.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What kind of loop and operations are you talking about ?

    In any case, you could use a flag that you set before calling QDrag'exec and you check before any long loop or operation and postpone its execution.

    Hope it helps



  • Our problem is the opposite, the other events are more important.

    We are rendering images on UI and that way creating a video playback.

    While drag operation is performed the video becomes choppy (only on windows). The problem I just posted was from Qt documentation, I am wondering if there is a workaround for it.


  • Lifetime Qt Champion

    What about doing the rendering in a thread and only the "showing" in your GUI ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.