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. why my icon has gone?
Forum Updated to NodeBB v4.3 + New Features

why my icon has gone?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 571 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.
  • W Offline
    W Offline
    Wgxzzzzzzc
    wrote on last edited by
    #1

    捕获.PNG
    捕获.PNG
    as shown above, my icon has gone. i am puzzled about this problem. there is my code that switch between mainwinodw and dialog. when i open the dialog, i hide the mainwindow and set the dialog's attribute to facilitate destruction of dialog when it is closed.

                    hide();
                    adminDialog = new AdminDialog(this, ui->lineEdit_userName->text());
                    adminDialog->setAttribute(Qt::WA_DeleteOnClose);
                    adminDialog->show();
                    connect(adminDialog->returnQuit(), SIGNAL(clicked()), this, SLOT(returnSignInDialog()));
    
    1 Reply Last reply
    -1
    • W Wgxzzzzzzc

      @Christian-Ehrlicher no, i didn't set my dialog icon, it's the default setting. i just hide the mainwindow and show dialog, but this behavior induce dialog's taskbar icon disappeared. you can see the picture 1, the icon is still exist, but in picture 2,i hide the SignIn window when i clicked SignIn Button(登录)and the taskbar icon is disappeared.

      B Offline
      B Offline
      Bonnie
      wrote on last edited by
      #4

      @Wgxzzzzzzc
      A dialog with a parent doesn't have its own taskbar button.
      If you want it to show on the taskbar, don't pass this as its parent.

      W 1 Reply Last reply
      1
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Where do you set the icons? What do you do when they disappear. Please provide a minimal, compilable example.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        0
        • W Offline
          W Offline
          Wgxzzzzzzc
          wrote on last edited by
          #3

          @Christian-Ehrlicher no, i didn't set my dialog icon, it's the default setting. i just hide the mainwindow and show dialog, but this behavior induce dialog's taskbar icon disappeared. you can see the picture 1, the icon is still exist, but in picture 2,i hide the SignIn window when i clicked SignIn Button(登录)and the taskbar icon is disappeared.

          B 1 Reply Last reply
          0
          • W Wgxzzzzzzc

            @Christian-Ehrlicher no, i didn't set my dialog icon, it's the default setting. i just hide the mainwindow and show dialog, but this behavior induce dialog's taskbar icon disappeared. you can see the picture 1, the icon is still exist, but in picture 2,i hide the SignIn window when i clicked SignIn Button(登录)and the taskbar icon is disappeared.

            B Offline
            B Offline
            Bonnie
            wrote on last edited by
            #4

            @Wgxzzzzzzc
            A dialog with a parent doesn't have its own taskbar button.
            If you want it to show on the taskbar, don't pass this as its parent.

            W 1 Reply Last reply
            1
            • B Bonnie

              @Wgxzzzzzzc
              A dialog with a parent doesn't have its own taskbar button.
              If you want it to show on the taskbar, don't pass this as its parent.

              W Offline
              W Offline
              Wgxzzzzzzc
              wrote on last edited by
              #5

              @Bonnie thank your solution that helping me resolve this 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