1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import QtQuick 2.11
- import QtQuick.Controls 2.14
- Row{
- property string paraName
- property int paraLength
- property alias validator:textField.validator
- property alias textFocus:textField.focus
- property alias text:textField.text
- property alias inputMethodHints:textField.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: 20
- }
- TextField {
- id: textField
- anchors.verticalCenter: parent.verticalCenter
- font.pixelSize: 20
- font.bold: false
- onTextEdited: {
- userAccept(text)
- }
- background: Rectangle {
- id:bg
- implicitWidth: paraLength
- height: 28
- radius: 4
- border.color: "#0099cc"
- }
- // placeholderText: qsTr("请输入")
- }
- }
|