Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Use qt/qml widget as android.view.View
Forum Updated to NodeBB v4.3 + New Features

Use qt/qml widget as android.view.View

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 4 Posters 1.4k 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.
  • S Offline
    S Offline
    seniorivn
    wrote on last edited by seniorivn
    #1

    I need to return android.view.View in java code, that will be contain Qt/qml item, so i thought that i will return QtActivity, but it extends android.app.Activity and not extends android.view.View.

    So, how can i create android.view.View with Qt/qml widget?

    Links:
    https://developer.android.com/reference/android/view/View.html
    https://developer.android.com/reference/android/app/Activity.html

    1 Reply Last reply
    0
    • S Offline
      S Offline
      seniorivn
      wrote on last edited by
      #2

      I stil have hope that someone will help me.
      But i've found theoretically working way to do that(show qt/qml as android.view.View):
      implement onDraw(): that will get bitmap from cpp code.
      in cpp code get bitmap from application window grabWindow().
      So it will show qt/qml window as it is.

      But there is need to send touch events to it.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        seniorivn
        wrote on last edited by
        #3

        may be to implement touch events in this case i need to use https://doc.qt.io/qt-5/qtest-qtoucheventsequence.html to convert android touch events to qt touch events, but hope that already done by qt extras and i just didn't find it.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          Tusovshik
          wrote on last edited by
          #4

          Wow, thanks for your links. Really helpful.

          S 1 Reply Last reply
          0
          • T Tusovshik

            Wow, thanks for your links. Really helpful.

            S Offline
            S Offline
            seniorivn
            wrote on last edited by
            #5

            @Tusovshik are you trying to do the same thing?

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jhayar
              wrote on last edited by
              #6

              have you already solve this ? i'm also looking how to do this .

              I believe QuickItem is extended android.view.View

              TomZT 1 Reply Last reply
              0
              • J jhayar

                have you already solve this ? i'm also looking how to do this .

                I believe QuickItem is extended android.view.View

                TomZT Offline
                TomZT Offline
                TomZ
                wrote on last edited by
                #7

                @jhayar please start a new thread instead of reviving 7 year old ones.

                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