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. Issue with WIndowStaysOnTopHint on Linux RHEL8 with X11 Display. Qt version 5.15.3.
Forum Updated to NodeBB v4.3 + New Features

Issue with WIndowStaysOnTopHint on Linux RHEL8 with X11 Display. Qt version 5.15.3.

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 35 Views 1 Watching
  • 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.
  • Qt_DeveloperQ Online
    Qt_DeveloperQ Online
    Qt_Developer
    wrote last edited by
    #1

    I am having an issue using the WindowStaysOnTopHint flag on Linux. I believe the manager is X11. I want the window to pop to the top when it prints an error message. For some reason it works the first time around while the app is running. The flag is set and then I do show() and it comes to the front. I then want it to stay at the top but disable that flag so its not always on top anymore. Its really just to let the user see there is an error. The second time I interact and have an error print there is no response from the app and it doesn't go to the top. I tested to see what happens if I disable it, and I can disable it ( i know this was a major issue for years on Linux ), but after disabling it, when the slot is called it does not get set to true again. Please help me out, I have tried to find help online but there is no in depth explanation to the Qt WindowFlags. Thank you.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi,

      From the doc of WindowStaysOnTopHint:

      Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly.
      

      Did you also set Qt::X11BypassWindowManagerHint ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Qt_DeveloperQ Online
        Qt_DeveloperQ Online
        Qt_Developer
        wrote last edited by
        #3

        Hello,
        Yes I did. With that I am able to pop the window to the front every time it gets set. Thank you!
        However, I now run into the issue when I don't want it to be stuck at the front of the stack. When it receives an error it pops to the front thats great. But then I want to disable it so its not stuck at the front. Is there a way to disable it but keep it showing, so it doesn't disappear when I disable those two flags? Right now I am doing hide() and show() when I disable it so thats why it disappears then reappears at the bottom of the stack, therefore not showing anymore.

        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