bool MyInputPanelContext::filterEvent(const QEvent* event)
{
if (event->type() == QEvent::RequestSoftwareInputPanel) {//输入请求,这个好理解,双击输入栏就会发生这个请求
updatePosition();
inputPanel->show();
return true;
} else if (event->type() == QEvent::CloseSoftwareInputPanel) {//但是关闭事件,什么时候会发生呢,或者说是怎么引起的呢
inputPanel->hide();
return true;
}
return false;
}
软键盘按键无效,发现是CloseSoftwareInputPanel起作用了,导致软键盘hide。
想请问下:QEvent::CloseSoftwareInputPanel在什么情况下产生?