Results 1 to 5 of 5

Thread: Searching for the equivalent of WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE with Qt

  1. #1
    Join Date
    Feb 2008
    Posts
    26
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Searching for the equivalent of WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE with Qt

    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).

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Searching for the equivalent of WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE with Qt

    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.

  3. #3
    Join Date
    Feb 2008
    Posts
    26
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Searching for the equivalent of WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE with Qt

    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?).

  4. #4
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Searching for the equivalent of WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE with Qt

    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.

  5. #5
    Join Date
    Feb 2008
    Posts
    26
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Searching for the equivalent of WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE with Qt

    Yeah, thought about that as well, but the delay is unfortunately not acceptable for me.

    Thanks for thinking about it though.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.