stevocz
12th July 2013, 13:53
hi.
i have this qml button. how can i change border.width in c++ code?
import QtQuick 1.1
Rectangle {
id: button
width: 150
height: 40
radius: 10
gradient: Gradient {
GradientStop {
position: 0.41
color: "#008000"
}
GradientStop {
position: 1
color: "#394f2f"
}
}
clip: true
smooth: true
border.color: "red"
border.width: 0
scale: 1
rotation: 0
signal qmlClicked(string msg)
signal clicked()
Text {
id: name
x: 77
y: 27
text: qsTr("Name")
font.pointSize: 10
anchors.verticalCenterOffset: 9
anchors.horizontalCenterOffset: 26
style: Text.Sunken
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
anchors.centerIn: parent; color: "white"
}
}
i can change text, and other things but no border.width
i have this qml button. how can i change border.width in c++ code?
import QtQuick 1.1
Rectangle {
id: button
width: 150
height: 40
radius: 10
gradient: Gradient {
GradientStop {
position: 0.41
color: "#008000"
}
GradientStop {
position: 1
color: "#394f2f"
}
}
clip: true
smooth: true
border.color: "red"
border.width: 0
scale: 1
rotation: 0
signal qmlClicked(string msg)
signal clicked()
Text {
id: name
x: 77
y: 27
text: qsTr("Name")
font.pointSize: 10
anchors.verticalCenterOffset: 9
anchors.horizontalCenterOffset: 26
style: Text.Sunken
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
anchors.centerIn: parent; color: "white"
}
}
i can change text, and other things but no border.width