Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-38131

[Regression] resizeEvent followed by moveEvent under Qt 5, but not under Qt 4

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.8.5, 5.3.0 Beta1
    • GUI: Window management
    • None
    • At least Windows 8.1 with VS 2013 and OS X 10.9 with clang.

    Description

      Under Qt 5.8.3 beta (and possibly earlier, I don't know) if the user resizes a window by dragging the top or left edge, the result is execution of QWidget::resizeEvent() followed by a execution of QWidget::moveEvent().

      Under Qt 4.8.6 (at least) I see only QWidget::resizeEvent().

      This is problematic, because I need to respond to either resizeEvent or moveEvent and not both. Responding to both causes recursion.

      My application works under 4.8.6- I only get one or the other event, not both.

      My application suffers from recursion under 5.8.3 because a single user action results in two events.

      If I could examine the QResizeEvent class and determine that the left or top edge was moved, I could avoid the recursion. But QResizeEvent contains only sizes, not window geometry, so I can't tell which edge moved.

      My preferred solution would be to have the "extra" event eliminated in Qt 5, so that it would work like Qt 4. But at the least I want the information about which edge(s) were moved.

      Attachments

        1. main.cpp
          0.2 kB
        2. MainWindow.cpp
          0.6 kB
        3. MainWindow.h
          0.4 kB
        4. MainWindow.ui
          0.6 kB
        5. ResizeMoveEvent.pro
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            johnweeks John Weeks
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes