QML: reference of parent from cursor delegate = Unqualified access

Viewed 58

For such code:

import QtQuick 2.15

TextInput {
    id: textInput
    cursorDelegate: Rectangle {
        visible: textInput.activeFocus && textInput.selectionStart === textInput.selectionEnd
    }
}

I got warning from qmllint:

Warning: Test2.qml:6:18: Unqualified access
        visible: textInput.activeFocus && textInput.selectionStart === textInput.selectionEnd
                 ^^^^^^^^^ 

Any how to fix this warning and what the problem with access to textInput from cursorDelegate?

0 Answers
Related