Planned maintenance: From Sunday 8th December 10:00 CET there will be changes to try and solve the caching issues that have been experienced. If anyone has a problem connecting after this period then please PM @AndyS or any of the moderators.

Changing window resize behavior

  • Hi,
    Resizing the main window of my QWidgets application is quite slow (there are lots of widgets, scroll areas etc and it's on a Retina Mac so 2880x1800). I'd like to change it so when resizing we just see the outline and the window is only resized when we release mouse button.
    Any option to change the resizing mode of windows with Qt ? (the problem is mostly on macOS)
    Thanks !

  • Lifetime Qt Champion

    Does macOs have an option to scale / move windows as outlines as WindowsOS /offers?
    As far as I know, Qt offer no such feature on its own.
    You might be able to use an event filter to intercept the resize events and
    do differently by also catching paintEvent and instead draw a rect on the widget but you would also make sure its not still recalculating anything.
    I see no easy way to get this and event filter might have unforeseen issues.

  • You might be able to use an event filter to intercept the resize events

    I tried it and resizing is smoother but anyway the main thread event loop is not processing timer or other events while resizing. Changing threading handling in my application is not an easy task now unfortunately, but it seems that would be the only way to deal with this issue.

Log in to reply