Solved Minimizing borderless dialog issue
-
Hi! I want to minimize the borderless modal dialog so it should stay in the taskbar. The problem is, the dialog minimized to the bottom of the screen:
Screenshot:
Code:
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint); setWindowModality(Qt::ApplicationModal); this->setWindowState(Qt::WindowMinimized);
Also, this dialog is not the main window, so I think it should minimize them both when clicking minimize in the dialog.
I useQt 5.9.2
on Windows 10. How to fix this issue? Thanks in advance. -
I have found the problem and fixed it. The problem was, when initializing a dialog object I set the parent tothis
, and that strange bug occurs. So I remove the parent from the dialog object and dialog minimizes to the taskbar.After some checking the issue is still exists. Also, the issue present in another non borderless modal dialog.
Screenshot with minimized modal dialog with borders:
How to fix it? Thanks.
-
So the issue has been fixed by removing parent or setting it to
nullptr
. And this is not a bug inQt
, it's defaultWindows
behavior.