Skip to content

Instantly share code, notes, and snippets.

@PoisonousJohn
Last active April 28, 2017 12:42
Show Gist options
  • Save PoisonousJohn/c6db35362a774acd34152316188399dd to your computer and use it in GitHub Desktop.
Save PoisonousJohn/c6db35362a774acd34152316188399dd to your computer and use it in GitHub Desktop.
Causing a crash on qt 5.8
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
ListModel {
id: testModel
Component.onCompleted: {
testModel.append(
{
"key" : "click me to test",
"nested" : { "anotherObjKey": "test" } // this line causes a crash
}
);
}
}
ColumnLayout {
width: 100
Repeater {
model: testModel
delegate: Rectangle {
width: 200
height: 50
color: "#eee"
Text {
anchors.centerIn: parent
text: testModel.get(index).key
}
MouseArea {
anchors.fill: parent
onClicked: {
testModel.remove(0);
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment