why my icon has gone?
-
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()));
-
@Wgxzzzzzzc
A dialog with a parent doesn't have its own taskbar button.
If you want it to show on the taskbar, don't passthis
as its parent. -
Where do you set the icons? What do you do when they disappear. Please provide a minimal, compilable example.
-
@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.
-
@Wgxzzzzzzc
A dialog with a parent doesn't have its own taskbar button.
If you want it to show on the taskbar, don't passthis
as its parent.