[Interest] Loader keyboard problem
mark diener
rpzrpzrpz at gmail.com
Wed Aug 13 18:37:29 CEST 2014
I am having some strange behavior with a Loader sample program
for QtQuick 2.2
The Listview on Screen1.qml works
Here is the main.qml file:
import QtQuick 2.2
import QtQuick.Window 2.1
Window
{
id: mainwindow
visible: true
width: Screen.width
height: Screen.height
color: "black"
title: "Test Loader"
//Keyboard navigation under OSX Mavericks does not work for the loader
Loader
{
id: genload
anchors.fill: parent
source: "Screen1.qml"
}
//Keyboard navigation under OSX Mavericks works for the component
//Comment out the loader and Un-comment the component to see.
//Screen1 {}
}
/////////NEW QML FILE BELOW///////////
Here is the Screen1.qml file:
import QtQuick 2.2
Rectangle
{
anchors.fill: parent
color: "white"
opacity: 1
ListModel
{
id: listdata
ListElement
{
name : "Joe Vabeetz"
cell: "555-1212"
}
ListElement
{
name : "Mary Vabeetz"
cell: "555-1213"
}
ListElement
{
name : "Pete Vabeetz"
cell: "555-1214"
}
}
Component
{
id: listdelegate
Item
{
id: rowperson
width: parent.width - 10
height: 50
MouseArea
{
id: rowmousearea
hoverEnabled: false
anchors.fill: parent
onClicked:
{
listpeople.currentIndex = index
}
}
Text
{
id: rowname
text: '<b>Name:</b> ' + name
}
Text
{
id: rowcell
anchors.top: rowname.bottom
text: '<b>Cell:</b>' + cell
}
}
}
ListView
{
id: listpeople
anchors { fill: parent; margins: 22 }
model: listdata
delegate: listdelegate
highlight: Rectangle { color : "lightsteelblue"; radius : 5 }
focus: true
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140813/4fbed852/attachment.html>
More information about the Interest
mailing list