PDA

View Full Version : Searching for the equivalent of WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE with Qt



Stukfruit
13th February 2008, 02:14
I noticed in the documentation it's possible to compare the new size with the old size when resizing a widget or (main)window, but is there some way to get notified of when the user *started* or *stopped* resizing as well?

Perhaps I can explain better by saying, as noted in the subject, that I'm looking for the equivalent of WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE (but native to Qt instead).

marcel
13th February 2008, 06:21
There are no equivalents in Qt for these messages, but you can catch the native messages.
Reimplement QWidget::winEvent for your widget or window and listen for those two messages.

Stukfruit
13th February 2008, 07:10
That's too bad :( it would make the program I'm working on a lot slower on other platforms when resizing the window... (it needs to recalculate a bunch of data after resizing, but not when actually doing the resizing because it's far too slow to do in realtime).

Is there any (other) way to support this kind of notifications on Linux as well? I've read the ICCCM and EWMH-specs, but there doesn't seem to be much about starting or stopping resize-events in there (perhaps the reason why Trolltech didn't implement it?).

pherthyl
14th February 2008, 21:15
You could implement a workaround by just recalculating .5 seconds or so after the last received resize event. There will be a small delay in recalculating after the resize stopped, but the resize will be fast at least.

Stukfruit
21st February 2008, 20:51
Yeah, thought about that as well, but the delay is unfortunately not acceptable for me.

Thanks for thinking about it though.