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

QML Window declared inside an Item is not visible

    XMLWordPrintable

Details

    • 02c98b7590b060430dc5ce7e5821fa13087d25f7

    Description

      According to the document of Window type in QML:

      "A Window can be declared inside an Item or inside another Window;"

      However, the following code does not work with Qt 5.9.5 , Qt 5.10.1 and Qt 5.11 Beta 4 on Linux/Mac. The Window will not be visible. 

      import QtQuick 2.9
      import QtQuick.Window 2.2
      
      Item {
        Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
        }
      }
      
      

       

      However, the code above works with Qt 5.9.4 , Qt 5.10.0 . The window is visible. 

      This bug will affect multi-window applications,  make it difficult manage multi-window object instance.

      An example project is attached to reproduce the bug.

      Thanks

       

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            benlau Ben Lau
            Votes:
            16 Vote for this issue
            Watchers:
            20 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes