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. When a QMdiSubwindow is minimized, the restore icon becomes unreachable
Forum Updated to NodeBB v4.3 + New Features

When a QMdiSubwindow is minimized, the restore icon becomes unreachable

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 543 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.
  • M Offline
    M Offline
    Manuelsan
    wrote on last edited by
    #1

    On Windows, when I click the minimize icon on a QMdiSubWindow, it is reduced to a fraction of its title bar, and placed in the lower left corner of the QMdiArea. The maximize and close icons are still reachable, but the restore button is not. It's still possible to restore the widow by the pop up menu on right mous click.

    Is there a way to increase the width in minimized mode to show all decorations?

    M 1 Reply Last reply
    0
    • M Manuelsan

      On Windows, when I click the minimize icon on a QMdiSubWindow, it is reduced to a fraction of its title bar, and placed in the lower left corner of the QMdiArea. The maximize and close icons are still reachable, but the restore button is not. It's still possible to restore the widow by the pop up menu on right mous click.

      Is there a way to increase the width in minimized mode to show all decorations?

      M Offline
      M Offline
      Manuelsan
      wrote on last edited by
      #2

      Ok, I worked my way around this with the following slot on windowStateChanged:

      void MainWindow::resizeOnMinimize(Qt::WindowStates, Qt::WindowStates newState)
      {
        if((newState & Qt::WindowMinimized) == false) return;
      
        QPoint position(0, 0);
        bool minimizedWindowFound = false;
      
        foreach (QMdiSubWindow *window, mdiArea->subWindowList())
        {
          if (window->isMinimized())
          {
            QRect rect = window->geometry();
            rect.setWidth(window->minimumSizeHint().width() + 200);
            window->setGeometry(rect);
            if(minimizedWindowFound == false)
            {
              minimizedWindowFound = true;
              position = window->pos();
            }
            else window->move(position);
      
            position.setX(position.x() + window->width());
          }
        }
      }
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        What version of Qt are you using ?
        What OS are you running ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Manuelsan
          wrote on last edited by
          #4

          Hi SGaist! I'm using 5.7.0 on Windows 8.1

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Can you test that with a more recent version of Qt ? The current LTS is 5.12.5 and release is 5.13.1.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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