Solved How to minimize QT dialog window to taskbar ?
-
When i minimize my window it will always go to the left corner of my desktop. Is there i way i can minimize it to the taskbar like most applications do?
-
Hi
on what platform ?
Tried on windows 10, but seems the QDialog does the same as QMainWindow in regards
to minimized. -
@mrjj win10
-
@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.
yours do not ?
-
@mrjj no, mine does not
-
@lee64456546
What Qt version ?
Im using Qt5.12If your dont do to taskbar, when happens then`?
-always go to the left corner of my desktop.
like a small window or how ? -
Only top level windows are shown in the taskbar. If your dialog has a parent it is not top level.
-
@mrjj The Qt version i'm using is Qt5.5.1,
it like this -
@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(); -
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. -
@Chris-Kawa It works, thanks.