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. Restoring maximized Widgets

Restoring maximized Widgets

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.5k 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.
  • L Offline
    L Offline
    lukasf
    wrote on last edited by
    #1

    I am writing an application using the latest Qt libraries (4.7.1). It consists of a QMainWindow and several QDockWidgets. The DockWidgets have custom title bar widgets which enable the user to maximize them. This is of particular importance in a multi-monitor setup: main application window is displayed on one monitor, some DockWidget on the other monitor.

    If you minimize the main window, all dock widgets are minimized as well. However, as soon as you restore the main window, the maximized dock widgets are not restored properly. Although they appear to be still maximized (isMaximized returns true - resizing and moving is disabled), they are not at the right position (top-left corner).
    Calling showNormal(); showMaximized(); consecutively on a showEvent (in case the widget was maximized) solves the problem.

    Am I doing something wrong, or is Qt behaving in a erroneous way?
    Any help would be greatly appreciated!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      Sounds like a Qt bug --- QMainWindow::saveState / restoreState should handle everything.

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      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