mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
update
This commit is contained in:
parent
16e71f01b1
commit
1566e3934e
@ -45,14 +45,16 @@ Rectangle {
|
|||||||
FluTextBox {
|
FluTextBox {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
text: display
|
text: display
|
||||||
|
readOnly: true === columnSource[column].readOnly
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
selectAll()
|
selectAll()
|
||||||
}
|
}
|
||||||
onCommit: {
|
onCommit: {
|
||||||
if(!columnSource[column].readOnly)
|
if(!readOnly){
|
||||||
display = text
|
display = text
|
||||||
|
}
|
||||||
tableView.closeEditor()
|
tableView.closeEditor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -358,7 +360,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resetPosition(){
|
function resetPosition(){
|
||||||
table_view.positionViewAtCell(Qt.point(0, 0),Qt.AlignTop|Qt.AlignLeft)
|
table_view.positionViewAtCell(Qt.point(0, 0),Qt.AlignTop|Qt.AlignLeft)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,11 @@ TextField{
|
|||||||
width: 20
|
width: 20
|
||||||
height: 20
|
height: 20
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
visible: control.text !== ""
|
visible: {
|
||||||
|
if(control.readOnly)
|
||||||
|
return false
|
||||||
|
return control.text !== ""
|
||||||
|
}
|
||||||
anchors{
|
anchors{
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
Loading…
Reference in New Issue
Block a user