Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
-
d3a0bd5
Description
The following code causes qmlviewer to segfault:
import Qt 4.6
Rectangle {
Component {
id: appDelegate
Item {
id : wrapper
Script {
function startupFunction()
{
if (index < 5)
if (index == 5)
{ view.currentIndex = index; } }
}
Component.onCompleted: startupFunction();
width: 30; height: 30
Text
Keys.onPressed:
{ console.log("In"); } }
}
Component {
id: appHighlight
Rectangle
{ width: 30; height: 30; color: "lightsteelblue" }}
GridView
{ id: view anchors.fill: parent cellWidth: 30; cellHeight: 30 model: 35 delegate: appDelegate highlight: appHighlight focus: true }}
The expected behaviour is that the item at index 5 should be the current index on start.