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. Prevent dialog to be minimized when MainDialog is.
Qt 6.11 is out! See what's new in the release blog

Prevent dialog to be minimized when MainDialog is.

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

    Hi all,

    Is there any way to prevent Child dialog (QDialog) to be minimized when the MainDialog (QMainDialog) is minimized ?

    Or do I have to trick it by creating an invisible main dialog and replace my current main dialog by a normal dialog ?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi and welcome
      is QMainDialog, QMainwindow?
      Anyway, if you create the dialog without a parent and display it using
      ->Show(), it will not minimize with Main. But if you click on main it can fall behind.

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

        After double check, my Main dialog is actually just a QDialog.
        I create it with :
        MainDialog *mainDlg = new MainDialog();

        Then all "child" dialog are created from the MainDialog constructor :
        settingDialog = new SettingDialog();

        I checked with a breakpoint that settingDialog->parent() is null.

        I am using kwin as window manager. Wonder if that can be the source of the problem ?

        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