コード例 #1
0
/*!
    Requests virtual keyboard to close.

    Normally applications should not need to call this function,
    keyboard should automatically close when the text editor loses
    focus, for example when the parent view is closed.
*/
void QInputMethod::hide()
{
    Q_D(QInputMethod);
    QPlatformInputContext *ic = d->platformInputContext();
    if (ic)
        ic->hideInputPanel();
}
コード例 #2
0
static void aboutToStopCallback(UApplicationArchive *archive, void* context)
{
    Q_UNUSED(archive)
    DASSERT(context != NULL);
    QMirClientClientIntegration* integration = static_cast<QMirClientClientIntegration*>(context);
    QPlatformInputContext *inputContext = integration->inputContext();
    if (inputContext) {
        inputContext->hideInputPanel();
    } else {
        qWarning("QMirClientClientIntegration aboutToStopCallback(): no input context");
    }
    QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationSuspended);
}