Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.10.1
-
None
Description
Form.qml:
import QtQuick 2.0 import QtQuick.Controls 2.2 Item { property alias field: field TextField { id: field property alias backgroundColor: rectangle.color background: Rectangle { id: rectangle implicitWidth: 200 implicitHeight: 40 border.width: field.activeFocus ? 2 : 1 color: field.palette.base border.color: field.activeFocus ? field.palette.highlight : field.palette.mid } } }
bugreport.qml:
import QtQuick 2.9 Item { Form { // This doesn't work: field.backgroundColor: "red" // This works: /*Component.onCompleted: { field.backgroundColor = "red"; }*/ } }
Error: Cannot assign to non-existent property "backgroundColor"
Related: http://www.qtcentre.org/threads/55226-Error-Cannot-assign-to-non-existent-property
Attachments
Issue Links
- is duplicated by
-
QTBUG-66632 Aliases to id objects have the wrong type if the object declares properties
-
- Closed
-