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- Close all Subwindows
Forum Updated to NodeBB v4.3 + New Features

QMdiArea- Close all Subwindows

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.7k 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
    ManasQt
    wrote on last edited by
    #1

    Hi,
    I have QMainWindow which has QMdiArea and I am trying to pop up a message box with QTreeView which displays Unsaved sub-windows list with a confirmation message whether user wants to Save-No-Cancel them as buttons on it.

    As I click on QMianWindow close button(X) it  brings up Confirmation Message Dialog Box and gets the user response.After that current QMdiSubwindow is loosing focus as active sub-window and QMdiArea.subWindowList(order=ActivationHistoryOrder)  is always gving me sub-windowslist in CreationOrder even after setting the QMdiArea.setActivationOrder(ActivationHistoryOrder)
    

    Basically i am trying to get the un saved QMdiSubWindows and close them one by one based on ActivationHistoryOrder and some other condition

    Why QMdiArea is loosing current subwindow focus when i bring DialogBox?.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      soroush
      wrote on last edited by
      #2

      Why you need focus? You can obtain unsaved documents by iterating over all child windows and checking their dirty flag (isWindowModified).

      1 Reply Last reply
      0
      • M Offline
        M Offline
        ManasQt
        wrote on last edited by
        #3

        Thanks for reply. actually its my mistake and i resolved it

        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