123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- import QtQuick 2.11
- import QtQuick.Controls 2.14
- Row{
- property string paraName
- property string plattext: ""
- property int paraLength
- property alias validator:numField.validator
- property alias textFocus:numField.focus
- //property alias text:numField.text
- property alias inputMethodHints:numField.inputMethodHints
- property alias background:bg
- spacing: 5
- //signal userAccept(var text)
- Text {
- id: name
- anchors.verticalCenter: parent.verticalCenter
- text: paraName
- color: "#272727"
- font.bold: true
- font.pixelSize: 13
- }
- UserComboBox{
- id: province
- anchors.verticalCenter: parent.verticalCenter
- font.pixelSize: 13
- width: 50
- height:25
- bgColor:"#D2D5D9"
- model: ListModel{
- id: jc
- ListElement{ text:"京" }
- ListElement{ text:"津" }
- ListElement{ text:"沪" }
- ListElement{ text:"渝" }
- ListElement{ text:"冀" }
- ListElement{ text:"豫" }
- ListElement{ text:"云" }
- ListElement{ text:"辽" }
- ListElement{ text:"黑" }
- ListElement{ text:"湘" }
- ListElement{ text:"皖" }
- ListElement{ text:"鲁" }
- ListElement{ text:"新" }
- ListElement{ text:"苏" }
- ListElement{ text:"浙" }
- ListElement{ text:"赣" }
- ListElement{ text:"鄂" }
- ListElement{ text:"桂" }
- ListElement{ text:"甘" }
- ListElement{ text:"晋" }
- ListElement{ text:"蒙" }
- ListElement{ text:"陕" }
- ListElement{ text:"吉" }
- ListElement{ text:"闽" }
- ListElement{ text:"贵" }
- ListElement{ text:"粤" }
- ListElement{ text:"青" }
- ListElement{ text:"藏" }
- ListElement{ text:"川" }
- ListElement{ text:"宁" }
- ListElement{ text:"琼" }
- ListElement{ text:"港" }
- ListElement{ text:"澳" }
- ListElement{ text:"台" }
- }
- Component.onCompleted:{
- currentIndex = find("浙")
- }
- onCurrentTextChanged: {
- //root.state = currentText
- plattext = currentText+numField.text
- }
- }
- TextField {
- id: numField
- anchors.verticalCenter: parent.verticalCenter
- font.pixelSize: 11
- font.bold: false
- onTextEdited: {
- //userAccept(text)
- plattext = province.currentText+text
- }
- background: Rectangle {
- id:bg
- implicitWidth: paraLength
- height: 25
- radius: 4
- border.color: "#0099cc"
- }
- // placeholderText: qsTr("请输入")
- }
- }
|