Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130685

Window embedding does not work

    XMLWordPrintable

Details

    • Android

    Description

      As written in the blog article below, Qt 6.7 enabled embedding a window inside another window :

      https://www.qt.io/blog/window-embedding-in-qt-quick

       

      I tried embedding a window where a button located into another window where WebView located with the following QML code.

       

      import QtQuick
      import QtQuick.Controls
      import QtWebView
      
      Window {
          id: layer1window
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
          
          WebView {
              id: webView
              url: "https://www.qt.io"
          }
          
          Window {
              id: layer2window
              color: "transparent"
              parent: layer1window
              visible: true
              width: 200
              height: 100
              x: (layer1window.width - width) / 2
              y: (layer1window.height - height) / 2
              
              Button {
                  width: layer2window.width
                  height: layer2window.height
                  text: "Button on top"
                  onClicked: print("clicked button on top")
              }
          }
      } 

       

      I confirmed this works with Qt 6.7.3 for Android + a Physical Android 12 device. (See attached screen shot)

      However, it does not work with Qt 6.8.0 for Android, with the same physical device. After deployment, it runs and opens a window once, but the window immediately closes.

       

      Please see attached "6_8_0_compile_output.txt" and "6_8_0_application_output.txt".

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            hitoshiito Hitoshi Ito
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes