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 (hiding) top window (e.g. QDialog) without affecting the main window
Forum Updated to NodeBB v4.3 + New Features

Minimizing (hiding) top window (e.g. QDialog) without affecting the main window

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 680 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.
  • deisikD Offline
    deisikD Offline
    deisik
    wrote on last edited by deisik
    #1

    What I want:

    1. A floating window like a QDialog (with a Qt::Tool flag set) always staying on top
    2. Minimize or hide it without minimizing the main app along with it

    I changed the top window title buttons via Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint, so the top window shows only the Minimize button (as required). But when I hit it, the main application window gets minimized too. I'm on Linux/X11

    If I make the top window a separate window (with a Qt::Window flag set), it can be minimized without affecting the main app, but it doesn't stay on top if I pass focus to the main window

    The Close button in the top window works in the way I want, but I want to do the same with the Minimize button, removing the Close button completely. Any help will be greatly appreciated

    Thank you

    deisikD 1 Reply Last reply
    0
    • deisikD deisik

      What I want:

      1. A floating window like a QDialog (with a Qt::Tool flag set) always staying on top
      2. Minimize or hide it without minimizing the main app along with it

      I changed the top window title buttons via Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint, so the top window shows only the Minimize button (as required). But when I hit it, the main application window gets minimized too. I'm on Linux/X11

      If I make the top window a separate window (with a Qt::Window flag set), it can be minimized without affecting the main app, but it doesn't stay on top if I pass focus to the main window

      The Close button in the top window works in the way I want, but I want to do the same with the Minimize button, removing the Close button completely. Any help will be greatly appreciated

      Thank you

      deisikD Offline
      deisikD Offline
      deisik
      wrote on last edited by deisik
      #2

      Okay, it seems that I was able to get what I wanted by creating the top window without a parent and setting a Qt::WindowStaysOnTopHint flag on it

      Problem solved

      1 Reply Last reply
      1

      • Login

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