Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMdiArea::tileSubWindows() always places widgets in ActivationHistoryOrder in SubWindowView mode
Qt 6.11 is out! See what's new in the release blog

QMdiArea::tileSubWindows() always places widgets in ActivationHistoryOrder in SubWindowView mode

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alex_malyu
    wrote on last edited by
    #1

    found in Qt 4.8 ( not sure about 5.*)

    check is simple and can be demonstrated on mdi example :

    • create 2 subwindows
    • click Tile menu command
    • click inactive subwindow to activate it
    • click Tile menu command
      result unexpected: subwindows switch positions

    I created my own example to doublecheck with following lines

    1. @ ui.mdiArea->setViewMode( QMdiArea::SubWindowView);
      ui.mdiArea->setActivationOrder( QMdiArea::CreationOrder );
      @

    result is the same.

    Work around which also demonstrates the problem:
    instead of ui.mdiArea->tileSubWindows()
    call custom slot with code below:

    @ QMdiSubWindow *a = ui.mdiArea->activeSubWindow();
    QList<QMdiSubWindow *> list = ui.mdiArea->subWindowList( ui.mdiArea->activationOrder( ) );
    for( int i=0; i< list.count(); i++ )
    {
    ui.mdiArea->setActiveSubWindow( list[i] );
    }

    ui.mdiArea->tileSubWindows();
    ui.mdiArea->setActiveSubWindow( a );
    @
    result - subwindows are tiled in activationOrder( )

    Regards,
    Alex Malyushytsky

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alex_malyu
      wrote on last edited by
      #2

      I installed Qt 5. The same bug is present.
      Guess I will have to report the bug.

      Regards,
      Alex

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved