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. [SOLVED] QMainWindow doesn't resize to minimum

[SOLVED] QMainWindow doesn't resize to minimum

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.4k Views
  • 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
    Anticross
    wrote on last edited by
    #1

    I have the same task, or very look like : http://developer.qt.nokia.com/forums/viewthread/8716 . I use resize method bu it not resized my height to minimum or even I make resize (QSize(200,0)); the height is not minimum as possible. if I use sizeHint() it works but after some number of openings, closings of dock widget it also don't work. So how can I hide or minimize work are of my main window leave only toolBars and status bars and hide non used are.

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

      Strange, but if I use that:
      @void PlayerWidget::onCloseDock(bool visible)
      {
      if(visible)
      resize(width(),sizeHint().height());
      else
      resize(QSize(width(),minimumHeight()));
      }@
      it works. I mean it works well when I'm set width() and minimumHeight() as size but not as minimumSize(). So It's solved :)

      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