-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
6.10.0
import QtQuick import QtQuick.Controls ApplicationWindow { id: window width: 640 height: 480 visible: true property bool shiftPressed: false Item { id: shiftHandler Keys.onPressed: (event) => shiftPressed = event.modifiers & Qt.ShiftModifier Keys.onReleased: (event) => shiftPressed = event.modifiers & Qt.ShiftModifier } }
Unqualified access: shiftPressed is a member of a parent element. You can qualify the access with its id to avoid this warning. [unqualified]
Its fix:
Keys.onPressed: (event) => shiftPressed = event.modifiers & Qt.window.ShiftModifier Keys.onReleased: (event) => shiftPressed = event.modifiers & Qt.window.ShiftModifier