在qml中,我用TextArea作为文本输入框,英文可以正常输入,当切换到中文输入法时(使用的是必应输入法),输入的仍然是英文,需要鼠标先点击程序界面之外(比如我点击电脑桌面),再点击该TextArea,才能成功转换成中文输入。把该段代码单独抽出来运行时出现如下提示:libpng warning: i C C P : known incorrect sRGB profile。请大神们帮我解决一下问题,感激不尽!我使用的是Qt 5.4.2版本,win7系统。qml小白求教。相关代码如下:
import QtQuick 2.0import QtQuick.Controls 1.3import QtQuick.Controls.Styles 1.1Rectangle { id: groupbox x: 20 y: 40 width: 784 height: 500 color: "#eee" ...... property string notestring: "请输入说明" ...... GroupBox { id: groupbox1 x: 86 y: 233 width: 683 height: 34 flat: true Text { id: labelnote x: 0 width: 75 height: 20 text: qsTr("说明:") anchors.topMargin: 0 anchors.top: parent.top font.pixelSize: 15 } TextArea { id: note x: 86 y: 0 width: 506 height: 40 Text { text: notestring opacity: 0.5 font.pixelSize: 15 } style: TextAreaStyle{ backgroundColor: "#eee" } onActiveFocusChanged: declarenotestring = "" } }}