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

QMdiArea switches active subwindow if subwindow contains a scrollarea

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.12.9, 6.5.0
    • Widgets: Main Window
    • None
    • All

    Description

      I'm making an application whose main window (QMainWindow) supplies a two-level QMdiArea: the main window contains an mdiarea as central widget, and each subwindow of the mdi area is another mdi area.

      The issue arise when the upper mdi area contains more than one subwindow. Let's name things to better describe the bug. The top-level mdi area contains two subwindows, titled "TOP 1" and "TOP 2". Each subwindow also contains a nested mdi area with 4 subwindows, titled "SUB 1" to "SUB 4".

      When the main window is created and displayed for the first time, "TOP 2/SUB 4" is active ("TOP 2" is active, and within it, the nested subwindow "SUB 4" is active). Now let's do the following through the UI:

      • select "TOP 2/SUB 1".
      • select "TOP 1". Here "TOP 1/SUB 4" is active.
      • select "TOP 1/SUB 1".
      • Then select "TOP 2". "TOP 2/SUB 2" is active while when we left "TOP 2", "TOP 2/SUB 1" was active!
      • If I select "TOP 1" again, then "TOP 1/SUB 2" is active...
      • And if I select "TOP 2" again, then "TOP 2/SUB 3" is active...

      The issue seems to happen only the "SUB X" nested subwindows contain a scroll area.

      You will find enclosed a sample code to reproduce the bug.

      Attachments

        1. CMakeLists.txt
          0.3 kB
          Sébastien Bini
        2. main.cpp
          2 kB
          Sébastien Bini

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            laugilus Sébastien Bini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: