Qml 文本输入句柄表情符号Windows 10
我有文本输入和标签作为占位符。通常,当textinput.length>0时,标签占位符隐藏。当用户按Windows+时;显示表情符号弹出窗口并选择,我无法处理事件Qml 文本输入句柄表情符号Windows 10,qml,Qml,我有文本输入和标签作为占位符。通常,当textinput.length>0时,标签占位符隐藏。当用户按Windows+时;显示表情符号弹出窗口并选择,我无法处理事件 Label { id: txtPlaceHolder anchors.fill: parent anchors.leftMargin: textInputLeftMargin horizontalAlignment: Text.AlignLeft verticalAlignment: Text
Label
{
id: txtPlaceHolder
anchors.fill: parent
anchors.leftMargin: textInputLeftMargin
horizontalAlignment: Text.AlignLeft
verticalAlignment: TextInput.AlignVCenter
color: placeholderColor
font.pixelSize: fontSize
visible: txtContent.text.length == 0
}
TextInput
{
id: txtContent
anchors.fill: parent
font.pixelSize: fontSize
selectionColor: root.selectionColor
font.bold: fontBold
MouseArea{
anchors.fill: parent
onClicked: txtContent.forceActiveFocus()
}
}
问题出在哪里?当用户选择表情符号填充到TextInput时,TextInput仍然长度=0,我无法隐藏TXT占位符。