Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-9742

Qt Designer adds unnecessary imports to the qml file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 2.8.0
    • Qt Creator 2.7.2
    • Quick Designer
    • None
    • Qt51 final on Ubuntu 12.04 LTS 64-bit
    • 5e571b57d6a8786f21d61d0cded26a0c90a1d1d7

    Description

      Creator adds a qml file to my project, which is based on Qt Quick 2 (with built-in elements) template. When I tried to edit the qml using designer to add a image resource stored locally in my project folder, I see "import QtQuick 1.1" added to the qml file.

      This is how the qml looked before I made any edits in designer:

      import QtQuick 2.0

      Rectangle {
      id: page
      width: 360
      height: 360

      MouseArea {
      anchors.fill: parent
      onClicked:

      { Qt.quit(); }
      }
      }

      This is how it looks after I added an image resource using designer:

      import QtQuick 2.0
      import QtQuick 1.1

      Rectangle {
      id: page
      width: 360
      height: 360

      MouseArea {
      anchors.fill: parent
      onClicked: { Qt.quit(); }

      }

      Image

      { id: image1 x: 10 y: 20 source: "qt-logo.png" }

      }

      Attachments

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

        Activity

          People

            thohartm Thomas Hartmann
            veshivas Venugopal Shivashankar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes