My code:
import QtQuick 2.6
import QtQuick.Window 2.2
Window {
visible: true
width: 640
height: 480
Item {
id: loaderParent
Loader {
id: loader
active: true
sourceComponent: Item {
parent: loaderParent
x: parent.x
}
}
}
Item {
focus: true
Keys.onPressed: {
loader.active = false;
}
}
}
When I press any key, I get this error:
qrc:/main.qml:16: TypeError: Cannot read property of null
Thought I suspect this error is harmless, I'd like an explanation or any idea for a fix/workaround?
Reported here.