prev->setEditFocus(false);
}
#endif
-#ifndef QT_NO_IM
- if (focus) {
- QInputContext *prevIc;
- prevIc = prev->inputContext();
- if (prevIc && prevIc != focus->inputContext()) {
- QEvent closeSIPEvent(QEvent::CloseSoftwareInputPanel);
- QApplication::sendEvent(prev, &closeSIPEvent);
- }
- }
-#endif
QFocusEvent out(QEvent::FocusOut, reason);
QPointer<QWidget> that = prev;
QApplication::sendEvent(prev, &out);
#include "QtCore/qlocale.h"
#include "QtCore/qset.h"
#include "QtGui/qregion.h"
+#include "QtGui/qinputpanel.h"
#include "QtWidgets/qsizepolicy.h"
#include "QtWidgets/qstyle.h"
#include "QtWidgets/qapplication.h"
QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
q->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) {
- QEvent event(QEvent::RequestSoftwareInputPanel);
- QApplication::sendEvent(q, &event);
+ qApp->inputPanel()->show();
}
}
}