Details
-
Bug
-
Resolution: Cannot Reproduce
-
P1: Critical
-
None
-
5.6.0
-
None
-
Windows 7 MSVC 2012 x64
Description
Accessing the ScrollBar and ButtonGroup attached properties causes a crash when qt.lab.controls components are wrapped in a qml module as suggested in the documentation
In the given example, the code causing a crash is commented
MyControls is a simple wrapper module around qt.labs.controls (see attached zip for the full code (the project does not copy the module automatically I just copied it by hand from the sources to the build directory))
import QtQuick 2.5 import QtQuick.Window 2.2 import QtQuick.Dialogs 1.2 import MyControls 1.0 import Qt.labs.controls 1.0 as LabCtrl Window { title: qsTr("Hello World") width: 640 height: 480 visible: true ButtonGroup { id: grp } Row { id: row RadioButton { text: "hello" //ButtonGroup.group: grp // !!! This will crash !!! LabCtrl.ButtonGroup.group: grp // !!! This works !!! } RadioButton { text: "bye" //ButtonGroup.group: grp // !!! This will crash !!! LabCtrl.ButtonGroup.group: grp // !!! This works !!! } } Flickable { anchors.top: row.bottom width: 200 height: 100 contentWidth: 200 contentHeight: 200 clip: true //LabCtrl.ScrollBar.vertical: ScrollBar{} // !!! This will crash !!! //LabCtrl.ScrollBar.vertical: LabCtrl.ScrollBar{} // !!! This will crash !!! Rectangle { width: 200 height: 200 gradient: Gradient { GradientStop {position: 0.0; color: "red"} GradientStop {position: 0.5; color: "green"} GradientStop {position: 1.0; color: "blue"} } } } }
QQmlObjectCreator::setPropertyBinding() will fail to resolve the attached type but uses the null pointer to QQmlType anyway.
This results in a crash without printing any useful information.
Attachments
Issue Links
- duplicates
-
QTBUG-53561 Using attached property namespace crashes in component creation
-
- Closed
-
- relates to
-
QTBUG-58286 Assert on startup with Controls2 ToolTip
-
- Closed
-