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. Widget always on top
Forum Updated to NodeBB v4.3 + New Features

Widget always on top

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.6k 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-static-prgmQ Offline
    QT-static-prgmQ Offline
    QT-static-prgm
    wrote on last edited by
    #1

    Hi,

    after i fixed my qtimer problem and the semitransparent background, there is still one problem left.
    I want my widget ALWAYS on top.
    I already Qt::WindowStaysOnTopHint and that makes it to stay always over all windows. But games do not work. So if i play the game in frameless window mod, it does work. But not in Fullscreen. But for the internetexplorer in Fullscreen, it does work again.

    So i searched a bit around and found out that it's a thing of DirectX/OpenGL. I hoped to fix it by using QOpenGlWidget instead of QWidget under my labels (thanks again @mjirou for that semi transparent trick), but that does not work.

    My code: https://git.rwth-aachen.de/carstenf/qtTsOverlay/tree/master

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I dont think normal Qt windows can be on top of fullscreen games.
      Its likely you need DirectX/opengl hooks to do so
      http://stackoverflow.com/questions/11810854/opengl-directx-hook-similar-to-fraps

      1 Reply Last reply
      1
      • QT-static-prgmQ Offline
        QT-static-prgmQ Offline
        QT-static-prgm
        wrote on last edited by
        #3

        Why not?? i tried using Qt3DWidnows instead of QWidgets under the labels, but didn't worked.

        How do other overlay manage that??

        mrjjM 1 Reply Last reply
        0
        • QT-static-prgmQ QT-static-prgm

          Why not?? i tried using Qt3DWidnows instead of QWidgets under the labels, but didn't worked.

          How do other overlay manage that??

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @QT-static-prgm said in Widget always on top:

          How do other overlay manage that??

          No idea. Try to find open source one and see what it does. :)

          1 Reply Last reply
          0
          • QT-static-prgmQ Offline
            QT-static-prgmQ Offline
            QT-static-prgm
            wrote on last edited by
            #5

            i just thought about that problem and did some research. I found out that i need to "hack" the d3d9 file for directx9. But that way i need to do a hack for each DirectX version and OpenGL.

            And i think there is an easier way. Look at the GeforceExperience Overlay. It doesn't only work on Games, it even works on the desktop. So does anybody know how they did that??

            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