Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Qml 文本输入句柄表情符号Windows 10_Qml - Fatal编程技术网

Qml 文本输入句柄表情符号Windows 10

Qml 文本输入句柄表情符号Windows 10,qml,Qml,我有文本输入和标签作为占位符。通常,当textinput.length>0时,标签占位符隐藏。当用户按Windows+时;显示表情符号弹出窗口并选择,我无法处理事件 Label { id: txtPlaceHolder anchors.fill: parent anchors.leftMargin: textInputLeftMargin horizontalAlignment: Text.AlignLeft verticalAlignment: Text

我有文本输入和标签作为占位符。通常,当textinput.length>0时,标签占位符隐藏。当用户按Windows+时;显示表情符号弹出窗口并选择,我无法处理事件

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占位符。