hi, i have a problem, because i dont use a qmlcontrol button (why in past versions of qml i can’t export this componenent in Windows), i create my custom component, a rectangle and in him, declare a mouse area, and when mouse area onEntered the width and height reduced in two or three, and when is onExited, the rectangle return to original size, the problem is when the area of screen changes, the size of component keeps how the last size, i try with states, but don’t work, here is example.@@
Item{
width: ((arrayButtons.width/3) -3); height: 31
Rectangle{
width:(parent.width -2); height: 29
color: "gray"
radius: 4
border.color: "#000000"
anchors.horizontalCenter: parent.horizontalCenter
//anchors.verticalCenter: parent.verticalCenter
Text {
text: qsTr("Detalles")
font.pointSize: 10
width: (parent.width - 1) ; height: 28
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
MouseArea {
id: detailMouseArea
anchors.fill: parent
onEntered: {
parent.height= 27
parent.width = parent.width -3
}
onExited:{
parent.height= 29
parent.width = (parent.width +3)
}
onClicked: {
switchOperationsMenu("DetailOperations.qml",false)
switchViewOfDetails(1)
}
}
}
}
↧