import QtQuick import QtQuick.Controls import "../common" // import "../Style" TextInput { width: 300 height: 50 font.pointSize: 12 font.family: "微软雅黑" font.weight: Font.ExtraLight Keys.onReturnPressed: { accept() } onAccepted: { // 阻止对话框关闭 // event.accepted = false; // 执行其他操作 console.log("Enter Key Pressed"); } }