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

[REG 5.6 - 5.9] QMainWindow layout does not adapt if QDockWidget with title widget with mouse tracking set is made floating

    XMLWordPrintable

Details

    • macOS, Windows

    Description

      Never changes layout QMainWindow when resizing window by mouse if QDockWidget is changed floating.

      Reproducible step:

      1. Drag green title bar on QDockWidget to float, and drop outside QMainWindow.
      2. Resize QMainWindow by mouse.
      3. The layout won’t be changed by step 2. (not change central Listbox size)

       

      That is observed with Qt 5.9.3 and later version even 5.11.1 on Windows 7 but that doesn’t see with Qt 5.6.1-1. Please see Qt5.9.3.png and Qt5.6.1-1.png in attachment what happened.

      Question is, how can get fixing to be same behavior with Qt 5.6.1-1 that means to get changing layout even using QWidget::setMouseTracking(true) for title bar because that is suspected that setMouseTracking(true) is one cause of reason.

       

      And that could be seen to reproduce on  Windows 10 environment. Then I suggested them to add “virtual void mouseMoveEvent(QMouseEvent *event) { event->ignore(); }” in inherited QWidget class for title bar for just passing through mouse moving event. Because I have never seen the problem with Qt 5.9.3 after adding that event->ignore() on Windows 10. However, the problem still causes on Windows 7 and macOS.

      Also, important thing is that reproducible rate is not 100%. Please try several times if you try to reproduce. 

      QTBUG-70239.zip is original one without calling event->ignore(), and QTBUG-70239-add-event-ignore.zip is my mentioned in attachment.

       

      Attachments

        1. Qt5.6.1-1.png
          21 kB
          Akihito Izawa
        2. Qt5.9.3.png
          22 kB
          Akihito Izawa
        3. qtbug70239.zip
          7 kB
          Andy Shaw
        4. qtbug70239.zip
          3 kB
          Friedemann Kleint
        5. QTBUG-70239.zip
          1 kB
          Akihito Izawa
        6. QTBUG-70239-add-event-ignore.zip
          3 kB
          Akihito Izawa

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              richard Richard Moe Gustavsen
              akizawa Akihito Izawa
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes