1 Star 2 Fork 1

soda151314 / TestTreeModelEx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CusTextInput.qml 920 Bytes
一键复制 编辑 原始数据 按行查看 历史
soda 提交于 2023-12-12 15:26 . 1.qml实现树形控件。
import QtQuick 2.12
import QtQuick.Controls 2.12
TextInput {
id: textEditRoot
signal textFinished()
property alias timer: textTimer
clip: true
selectByMouse: true
selectedTextColor: "#4D4D4D"
selectionColor: "#d7e7ff"
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
color: "#4D4D4D"
leftPadding: 5
font.pixelSize: 10
focus: true
onTextChanged: {
//console.log("text: ", text)
}
Keys.onReturnPressed: {
deselect()
textFinished()
}
Keys.onEnterPressed: {
deselect()
textFinished()
}
Timer {
id: textTimer
repeat: true
interval: 400
running: false
onTriggered: {
if(cursorVisible === false) {
stop()
visible = false
textFinished()
}
}
}
}
1
https://gitee.com/soda151314/test-tree-model-ex.git
git@gitee.com:soda151314/test-tree-model-ex.git
soda151314
test-tree-model-ex
TestTreeModelEx
master

搜索帮助