Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
5.14.1, 5.15.1
-
Ubuntu 20.04.1 LTS 64 bits, GNOME
Description
Hello,
here is a minimal example with which I get a segfault :
// main.qml import QtQuick 2.14 import QtQuick.Window 2.14 Window { id: root readonly property alias initialWidth: root.privates.initialWidth readonly property alias initialHeight: root.privates.initialHeight readonly property QtObject privates: QtObject { property int initialWidth: 640 property int initialHeight: 800 } width: root.initialWidth height: root.initialHeight visible: true title: qsTr("Hello World") }
In the main.qml, I'm just declaring two readonly alias properties in the purpose of exposing them outside outside of this component in a readonly manner. Yet I would like to allow the modifying of those properties inside this component via a private property, a non-existing concept in Qml but I try to mimic that with a property named "privates".
If I'm modifying this code in one of this way, everything work :
- Change "privates" from a property to a QtObject child of "root" with "privates" as id.
- Change the readonly properties "initialWidth" and "initialHeight" types from alias to int.
Is there something I'm doing wrong while using readonly aliases or is this an undefined bug/behavior ?
Thanks in advance.