Esempio n. 1
0
void VVimCmdLineEdit::setInputMethodEnabled(bool p_enabled)
{
    if (m_enableInputMethod != p_enabled) {
        m_enableInputMethod = p_enabled;

        QInputMethod *im = QGuiApplication::inputMethod();
        im->reset();
        // Ask input method to query current state, which will call inputMethodQuery().
        im->update(Qt::ImEnabled);
    }
}
Esempio n. 2
0
static PyObject *meth_QInputMethod_update(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        Qt::InputMethodQueries* a0;
        int a0State = 0;
        QInputMethod *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QInputMethod, &sipCpp, sipType_Qt_InputMethodQueries, &a0, &a0State))
        {
            sipCpp->update(*a0);
            sipReleaseType(a0,sipType_Qt_InputMethodQueries,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QInputMethod, sipName_update, doc_QInputMethod_update);

    return NULL;
}