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. How to minimize QT dialog window to taskbar ?
Forum Updated to NodeBB v4.3 + New Features

How to minimize QT dialog window to taskbar ?

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 3 Posters 3.0k 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi
    on what platform ?
    Tried on windows 10, but seems the QDialog does the same as QMainWindow in regards
    to minimized.

    L 1 Reply Last reply
    0
    • mrjjM mrjj

      Hi
      on what platform ?
      Tried on windows 10, but seems the QDialog does the same as QMainWindow in regards
      to minimized.

      L Offline
      L Offline
      lee64456546
      wrote on last edited by
      #3

      @mrjj win10

      mrjjM 1 Reply Last reply
      0
      • L lee64456546

        @mrjj win10

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #4

        @lee64456546
        Hi
        Im not sure i understand what you are asking then.
        If i have a QDialog as main window.
        it still goes to the taskbar like any other window.
        alt text

        yours do not ?

        L 1 Reply Last reply
        1
        • mrjjM mrjj

          @lee64456546
          Hi
          Im not sure i understand what you are asking then.
          If i have a QDialog as main window.
          it still goes to the taskbar like any other window.
          alt text

          yours do not ?

          L Offline
          L Offline
          lee64456546
          wrote on last edited by
          #5

          @mrjj no, mine does not

          mrjjM 1 Reply Last reply
          0
          • L lee64456546

            @mrjj no, mine does not

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #6

            @lee64456546
            What Qt version ?
            Im using Qt5.12

            If your dont do to taskbar, when happens then`?

            -always go to the left corner of my desktop.
            like a small window or how ?

            L 1 Reply Last reply
            0
            • Chris KawaC Offline
              Chris KawaC Offline
              Chris Kawa
              Lifetime Qt Champion
              wrote on last edited by
              #7

              Only top level windows are shown in the taskbar. If your dialog has a parent it is not top level.

              L 1 Reply Last reply
              4
              • mrjjM mrjj

                @lee64456546
                What Qt version ?
                Im using Qt5.12

                If your dont do to taskbar, when happens then`?

                -always go to the left corner of my desktop.
                like a small window or how ?

                L Offline
                L Offline
                lee64456546
                wrote on last edited by
                #8

                @mrjj The Qt version i'm using is Qt5.5.1, 0_1549249006834_捕获2.PNG
                it like this

                1 Reply Last reply
                0
                • Chris KawaC Chris Kawa

                  Only top level windows are shown in the taskbar. If your dialog has a parent it is not top level.

                  L Offline
                  L Offline
                  lee64456546
                  wrote on last edited by
                  #9

                  @Chris-Kawa when i Instantiate LoginDialog, i passed "this" parameter into it. And "this" refers to mainwindow class.
                  LoginDialog *logDlg = new LoginDialog(this);
                  logDlg->show();

                  Chris KawaC 1 Reply Last reply
                  0
                  • L lee64456546

                    @Chris-Kawa when i Instantiate LoginDialog, i passed "this" parameter into it. And "this" refers to mainwindow class.
                    LoginDialog *logDlg = new LoginDialog(this);
                    logDlg->show();

                    Chris KawaC Offline
                    Chris KawaC Offline
                    Chris Kawa
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    when i Instantiate LoginDialog, i passed "this" parameter into it

                    Yes and, as I said, that's why it behaves like that. Child windows don't show up in taskbar and they minimize like in your screenshot. Just pass a nullptr as a parent and it will show up in the taskbar.

                    L 1 Reply Last reply
                    6
                    • Chris KawaC Chris Kawa

                      when i Instantiate LoginDialog, i passed "this" parameter into it

                      Yes and, as I said, that's why it behaves like that. Child windows don't show up in taskbar and they minimize like in your screenshot. Just pass a nullptr as a parent and it will show up in the taskbar.

                      L Offline
                      L Offline
                      lee64456546
                      wrote on last edited by
                      #11

                      @Chris-Kawa It works, thanks.

                      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