Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] How to get correct winid.
Forum Update on Monday, May 27th 2025

[SOLVED] How to get correct winid.

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 5.3k 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.
  • X Offline
    X Offline
    xcoder
    wrote on last edited by
    #1

    I need to get correct winId from widget in c++ of course.
    I can draw VLC output on top of the graphicsscene, because that is the only valid winId.

    But I need winId for the widgets embedded in the parent qgraphicsscene.

    I tried
    mywidget->winId();
    mywidget->internalWinId();
    mywidget->effectiveWinId();

    Still no luck, cant embed VLC in the widget, but in the old type (desktop gui) I can embed VLC inside a button if I want, but in QML I seem not to get valid winId.

    So the question is, how can I get a valid winId from a child widget embedded in QML grahicsscene?

    Only a biker knows why a dog sticks his head out of a car window.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      loladiro
      wrote on last edited by
      #2

      I doubt that the windows manager is even aware of the shapes (not widgets, QML doesn't have that) contained within QML and it is therefore also not possible to obtain an ID, since it doesn't exist in the first place. However, you might be able to do some magic by subclassing QDeclarativeItem.

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xcoder
        wrote on last edited by
        #3

        How can I do that?

        Only a biker knows why a dog sticks his head out of a car window.

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xcoder
          wrote on last edited by
          #4

          Okay no worries, I'll just implement qml viewer in my app, and I'll just use same old Qt Designer.

          Only a biker knows why a dog sticks his head out of a car window.

          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