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. I need to include QtPlatformHeaders/QWindowsWindowFunctions
QtWS25 Last Chance

I need to include QtPlatformHeaders/QWindowsWindowFunctions

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 923 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.
  • A Offline
    A Offline
    Arist0tle
    wrote on 21 May 2021, 17:14 last edited by
    #1

    Hi,

    I'm using Qt 6.0.2 in connection with Visual Studio 2019 and I don't know how to include QWindowsWindowFunctions (I need this to solve a OpenGL issue, see https://doc.qt.io/qt-6/windows-issues.html).
    I tried #include <QtPlatformHeaders/QWindowsWindowFunctions> but it didn't work.
    I couldn't even find a directory QtPlatformHeaders somewhere in the Qt folder...

    Do I need to install something else?

    Thanks for any help!

    1 Reply Last reply
    0
    • C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 21 May 2021, 18:16 last edited by
      #2

      Looks like it's not yet ported - stay at 5.15 until then.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 21 May 2021, 18:37 last edited by
        #3

        Hi and welcome to devnet,

        It might also have been moved, see this blog post.

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

        N 1 Reply Last reply 1 Apr 2025, 11:17
        2
        • A Offline
          A Offline
          Arist0tle
          wrote on 21 May 2021, 19:00 last edited by
          #4

          Thank you very much for your answers so far!
          Yes, it seems that QWindowsWindowFunctions::setHasBorderInFullScreen has been moved to QWindowsWindow.
          I've been trying to get

          using namespace QNativeInterface::Private;
          if (auto *windowsWindow = dynamic_cast<QWindowsWindow*>(window->handle()))
              windowsWindow->setHasBorderInFullScreen(true);
          [...]
          

          to work (from the blog) but I don't know exactly how:

          • The class QWindowsWindow is defined in QtGui/6.0.2/QtGui/qpa/qplatformwindow_p.h. It seems a bit strange to include this file?
          • Do you know how I can get window->handle() from QMainWindow?

          Many thank again :)

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Arist0tle
            wrote on 22 May 2021, 08:17 last edited by Arist0tle
            #5

            For my actual problem (QMenu not visible when using OpenGL in QMainWindow with full screen) I found workarounds described in https://bugreports.qt.io/browse/QTBUG-41309.

            So I think I can close this thread, because as @Christian-Ehrlicher wrote, QWindowsWindowFunctions doesn`t seem to be ported properly yet.

            1 Reply Last reply
            0
            • S SGaist
              21 May 2021, 18:37

              Hi and welcome to devnet,

              It might also have been moved, see this blog post.

              N Offline
              N Offline
              NeerajUsadadiya
              wrote on 1 Apr 2025, 11:17 last edited by
              #6

              @SGaist Thank You. This helps and this is what I was searching for.

              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