Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
This is needed in order to support declaring the pressed property of PageIndicator's delegate as required:
import QtQuick import QtQuick.Controls.Material ApplicationWindow { width: 640 height: 480 visible: true PageIndicator { id: control count: 3 delegate: Rectangle { implicitWidth: 8 implicitHeight: 8 radius: width / 2 color: control.palette.dark opacity: index === control.currentIndex ? 0.95 : pressed ? 0.7 : 0.45 required property int index required property bool pressed Behavior on opacity { OpacityAnimator { duration: 100 } } } } }
Currently this results in the following error:
qrc:/quick/Main.qml:12:19: QML Component: Cannot create delegate qrc:/quick/Main.qml:22:13: Required property pressed was not initialized
We need a new status for when the object has been constructed, but the initial properties haven't been set yet. So before Ready, basically after QQmlComponentPrivate::beginCreate is done.
Attachments
Issue Links
- is required for
-
QTBUG-117864 PageIndicator API is broken by design
-
- Reported
-