0

The below code works fine in Qt Creator Edit Mode, but when I try to switch to Design Mode it gives an error:

"Can not open this qml document because of an error in the qml file."

And then I can't edit the layout graphically. If I comment out the Connect{} item then Design Mode works again and I can edit graphically.

Anybody see what the error might be.

What am I doin wrong? Thanks for looking.

import QtQuick 2.4
import QtQuick.Window 2.2

Window {
    id: window1
    visible: true

    Rectangle {
        id: rect
        color: "#ffffff"
        width: 100; height: 100

        MouseArea {
            id: mouseArea
            anchors.fill: parent
        }

        Connections {
            target: mouseArea
            onClicked: {
                print("clicked")
            }
        }

    }

}
  • Possible duplicate of [QML - Imperative code not supported](http://stackoverflow.com/questions/21325456/qml-imperative-code-not-supported) – folibis May 21 '16 at 19:34
  • Thanks for help. I changed the imperative code for a function call, but the error still persists. – shoulderstack May 21 '16 at 20:31

0 Answers0