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. How to Find a UI By ID at Runtime
Forum Updated to NodeBB v4.3 + New Features

How to Find a UI By ID at Runtime

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 359 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.
  • C Offline
    C Offline
    Chris Weber
    wrote on last edited by
    #1

    Couldn't find this question answered, but I have to believe it is a common question:
    Utterly new to Qt and I'm trying to access a UI declared in an QML file at runtime in Android/Java. Someone else created this, I just need a handle to their UI (in Java).

    QML has

    VideoWindow {
        id: player
        anchors.fill: parent
        focus: false
    }
    
    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I don't think it's possible get a window handle (if that's what you mean) on Android. Qt draws everything into an OpenGL texture on Android - all the system "sees" is a picture.

      There is a way for Qt apps to use Java stuff - through JNI. See QAndroiJniObject maybe it will help. To get some data from QML into Java via JNI, you first will need to pass the data from QML to C++.

      (Z(:^

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Chris Weber
        wrote on last edited by
        #3

        Hm so for an a/v playing app, would it be fair to say the a/v window (in native Android) should be in a separate activity with Qt drawn over it?

        sierdzioS 1 Reply Last reply
        0
        • C Chris Weber

          Hm so for an a/v playing app, would it be fair to say the a/v window (in native Android) should be in a separate activity with Qt drawn over it?

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @Chris-Weber said in How to Find a UI By ID at Runtime:

          Hm so for an a/v playing app, would it be fair to say the a/v window (in native Android) should be in a separate activity with Qt drawn over it?

          You can play AV in QML using QtMultimedia module.

          Whether it's possible to overlay Qt app on top of another activity - I'm not sure, you'd have to try it out.

          (Z(:^

          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