[Qt-qml] anchors.horizontalCenter bug ?
Stephen Collyer
scollyer at netspinner.co.uk
Mon Jul 26 17:17:20 CEST 2010
I have the following delegate for a ListView:
Component
{
id: people_delegate
Item
{
width: parent.width; height: 30
Row
{
width: parent.width; height: 30
Rectangle
{
width: parent.width/3
height: 30
color: "grey"
border.width: 4
border.color: "white"
radius: 6
Text
{
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: parent.width
text: name
color: "white"
}
}
Text { width: parent.width/3; text: role }
Text { width: parent.width/3; text: age }
}
}
}
The Text element with the anchors is centered vertically
as expected, but is left-justified: the anchors.horizontalCenter
has no effect.
Is this a bug ?
--
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100726/783ad559/attachment.html
More information about the Qt-qml
mailing list