I am using QtQuick.Controls 1.0
and QtQuick.Controls.Styles 1.0
and I can't find a way to properly align the label of the ComboBox
vertically and on the right.
This is my current code
import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
ComboBox {
id: comboCategories
width: 230
height: 30
style: ComboBoxStyle {
background: Rectangle {
id: rectCategory
width: comboCategories.width
height: comboCategories.height
color: "white"
}
label: Text {
anchors.verticalCenter: parent.verticalCenter
anchors.right: background.right
font.pointSize: 12
color: "#808080"
text: control.currentText
}
}
}
But the label stays in the top left of my element and does not seem to be affected by the anchors. I also tried to replace parent
with control
or background
with no effect