enjoy life and code

Qt/QML 鼠标可以选中的输入框 ( TextInput )

import QtQuick 2.15
 
TextInput {
    id: input
    verticalAlignment: Qt.AlignVCenter
    text: "Please Input"
    selectByMouse: true
    MouseArea {
        anchors.fill: parent
        cursorShape: Qt.IBeamCursor
        acceptedButtons: Qt.NoButton
    }
}

添加新评论