38 lines
782 B
QML
38 lines
782 B
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
BaseCommon
|
|
{
|
|
id: self
|
|
width: parent.width
|
|
height: 25
|
|
property var lst: ["GET","POST","PUT","DELETE"]
|
|
Item
|
|
{
|
|
id: titleItem
|
|
width: 100
|
|
height: parent.height
|
|
Text{
|
|
id: titleText
|
|
anchors.left: parent.left
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: title
|
|
}
|
|
}
|
|
|
|
ComboBox{
|
|
id: cb
|
|
anchors.left: titleItem.right
|
|
anchors.right: parent.right
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
model: lst
|
|
onActivated: {
|
|
value = lst[currentIndex]
|
|
}
|
|
}
|
|
|
|
function setValue(_value)
|
|
{
|
|
value = _value
|
|
cb.currentIndex = cb.find(_value)
|
|
}
|
|
} |