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

QML ApplicationWindow blank when calling show after a previous close

    XMLWordPrintable

Details

    • 5006158e4d20ac35d64bc7a581c9966401254002

    Description

      Following code demonstrates the problem.

      Once a Window is shown and closed, calling a show on it again renders a blank window.

      untitled.qml
      import QtQuick 2.1
      import QtQuick.Controls 1.0
      import QtQuick.Window 2.0
      
      ApplicationWindow {
        title: qsTr("Hello World")
        width: 640
        height: 480
        property ApplicationWindow win : ApplicationWindow {
          title: "hello"
          Button {
            text: "Something"
            anchors.centerIn: parent
          }
        }
      
        Button {
          anchors.left: parent.left
          text: "Open"
          onClicked: win.show();
        }
      
        Button {
          anchors.right: parent.right
          text: "Close"
          onClicked: win.hide()
        }
      }
      

      Steps to reproduce:

      • Create a new Qt Quick UI project from Qt Creator
      • Paste the above code into the qml file and run

      Now showing the Window first time is fine.
      If the opened window is hidden by using the Close button on the parent window, Calling show the second time shows the Window fine. However if you just close the Window directly from the Window chrome of the new window, calling show henceforth renders a blank Window.

      PS:

      This problem was also present in RC1_171 snapshot.

      Just downloaded the RC1 dev release installer today. This problem is present and also the entire app at most times starts up blank. Just cleaning the entire project and re-running seems to make it work once or twice and the problem repeats itself.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-35234
          # Subject Branch Project Status CR V

          Activity

            People

              sletta Gunnar Sletta
              nosf Viv Rajkumar
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes