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

Dynamically created Popup won't open

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.9.0 Beta 2
    • 5.7.1
    • Quick: Controls 2
    • None
    • Qt 5.7.1, Linux Mint 18, Cinnamon Desktop Environment.
    • 1041a95eb07e5cd25d96eec9dfc2243144638183

      When you dynamically create a Popup it can't find a window to open in, even when it's parent is an ApplicationWindow.

      import QtQuick 2.7
      import QtQuick.Controls 2.0
      
      ApplicationWindow {
          id: appWindow
          visible: true
          width: 640
          height: 480
      
          Button {
            text: "Show Popup"
            onClicked: {
              var newObject = Qt.createQmlObject(
                'import QtQuick.Controls 2.0; import QtQuick 2.7; Popup { Text { text: "hello"} }',
                appWindow,
                "dynamicSnippet1");
              newObject.open()
            }
          }
      }
      

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

            Unassigned Unassigned
            code Cody Scott
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes