How to minimize QT dialog window to taskbar ?
-
wrote on 3 Feb 2019, 02:03 last edited by
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. -
Hi
on what platform ?
Tried on windows 10, but seems the QDialog does the same as QMainWindow in regards
to minimized.wrote on 3 Feb 2019, 12:24 last edited by@mrjj win10
-
@mrjj win10
Lifetime Qt Championwrote on 3 Feb 2019, 12:27 last edited by mrjj 2 Mar 2019, 12:27@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 ?
-
@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 ?
wrote on 3 Feb 2019, 14:33 last edited by@mrjj no, mine does not
-
@mrjj no, mine does not
Lifetime Qt Championwrote on 3 Feb 2019, 14:40 last edited by mrjj 2 Mar 2019, 14:41@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.
-
@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 ?wrote on 4 Feb 2019, 02:57 last edited by@mrjj The Qt version i'm using is Qt5.5.1,
it like this -
Only top level windows are shown in the taskbar. If your dialog has a parent it is not top level.
wrote on 4 Feb 2019, 03:10 last edited by@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-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. -
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.wrote on 6 Feb 2019, 06:38 last edited by@Chris-Kawa It works, thanks.
5/11