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:
    0_1510351504895_2017-11-11_000440.jpg

    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 use Qt 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 to this, 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:

    0_1510400432885_FastStoneEditor1.jpg

    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 in Qt, it's default Windows behavior.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.