[Qt-qml] Rounded Corner Clipping Support in Rectangle
Bill.Bonney at nokia.com
Bill.Bonney at nokia.com
Wed Feb 2 00:04:00 CET 2011
Hello,
Why can we not support rounded corners in Image element with clipping on. I realize it's a performance hit, but if the image doesn't change width and height the impact to animations could be minimal. It would be useful for some layouts we would like to achieve.
i.e. the following code fails to clip the child image to the parent rectangle with rounded corners.
Cheers
Bill
import QtQuick 1.0
Rectangle {
width: 360
height: 360
Rectangle{
anchors.centerIn: parent
width: 100; height: 100
radius: 10
color: "red"
border.color: "black"
border.width: 5
clip: true
Image {
id: image
anchors.centerIn: parent
source: "imagetoclip.jpg"
}
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}
-------------------------------------
bill bonney
ovi store client architect
mobile: +1 604 771 0276
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110201/1a5d035f/attachment.html
More information about the Qt-qml
mailing list