Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Minimizing borderless dialog issue

Minimizing borderless dialog issue

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 1 Posters 710 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Cobra91151C Offline
    Cobra91151C Offline
    Cobra91151
    wrote on last edited by Cobra91151
    #1

    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.

    1 Reply Last reply
    0
    • Cobra91151C Offline
      Cobra91151C Offline
      Cobra91151
      wrote on last edited by Cobra91151
      #2

      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.

      1 Reply Last reply
      0
      • Cobra91151C Offline
        Cobra91151C Offline
        Cobra91151
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved