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. QWindow::fromWinId only implemented for XCB - How about windows?
Qt 6.11 is out! See what's new in the release blog

QWindow::fromWinId only implemented for XCB - How about windows?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.1k 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.
  • R Offline
    R Offline
    RolandWinklmeier
    wrote on last edited by
    #1

    Hi All,

    I was wondering, why the static method QWindow::romWinId() is only implemented in the XCB plugin and not in the windows platform plugin?

    I would really need it for my project currently. Are there any objectives or is it planned for a later release?

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

      Hi,

      What version of Qt are you using ?

      fromWinID is currently implemented in the gui module and all 3 desktop platforms support foreign windows.

      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
      • R Offline
        R Offline
        RolandWinklmeier
        wrote on last edited by
        #3

        Hi SGaist,

        thanks for the hint. I'm using Qt 5.1
        I was confused because the documentation of QWindow *QWindow::fromWinId(WId id) said:

        bq. Creates a local representation of a window created by another process or by
        using native libraries below Qt.
        Given the handle \a id to a native window, this method creates a QWindow object which can be used to represent the window when invoking methods like setParent() and setTransientParent(). This can be used, on platforms which support it, to embed a window inside a container or to make a window stick on top of a window created by another process.

        But the documentation of setParent (which is the method I wanted to use) said:

        bq. If \a parent is a window created by fromWinId(), then the current window will be embedded inside \a parent, if the platform supports it. Window embedding is currently supported only by the X11 platform plugin.

        A look into QWindowsIntegration::hasCapability showed that Qt::ForeignWindows was not defined. So I assumed after merging all this information together I thought its not working with windows.

        However, I had a look into the latest git sources and there were some changes.
        What I want to do is, put a QML project into a shared library and run it as a plugin in a native MFC application. The QML Window {} should be a child of the applications main window. You think this is possible?

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

          Very good question, but sorry, I don't know. Since it's an unusual case, you should ask this on the interest mailing list. You'll find Qt's developers/maintainers there (this forum is more user oriented)

          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

          • Login

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