Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15.0
-
None
Description
I received code from a forum user.
I have attached a snapshot of the code. (Wrong: it failed again about a missing tag)
In the application output (and when I run the app in the command line outside of Qt)
i receive this message: qrc:/main.qml:31: ReferenceError: dragMouse is not defined
As you can see the dragMouse is defined. The application works even with the
error.
Should it fail or should it work? Just wondering which is true.
Here is the QML file:
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.15 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Flickable { anchors.fill: parent contentWidth: gameBoard.width; contentHeight: gameBoard.height clip: true ScrollBar.horizontal: ScrollBar { active: true} ScrollBar.vertical: ScrollBar { active: true} Rectangle { id: gameBoard height: 2000 width: 2000 color: "grey" Repeater { model: 10 Drag.active: dragMouse.drag.active Rectangle { height: 80; width: 80 x : width * index y : height * index color: Qt.rgba(Math.random(),Math.random(),Math.random(),1) MouseArea { id: dragMouse anchors.fill: parent drag.target: parent } } } } } }