summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwidget_p.h')
-rw-r--r--src/gui/kernel/qwidget_p.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index f4cd61a..86702ac 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -61,6 +61,7 @@
#include "QtGui/qregion.h"
#include "QtGui/qsizepolicy.h"
#include "QtGui/qstyle.h"
+#include "QtGui/qapplication.h"
#ifdef Q_WS_WIN
#include "QtCore/qt_windows.h"
@@ -461,6 +462,19 @@ public:
QSize adjustedSize() const;
+ inline void handleSoftwareInputPanel(Qt::MouseButton button, bool clickCausedFocus)
+ {
+ Q_Q(QWidget);
+ if (button == Qt::LeftButton && qApp->autoSipEnabled()) {
+ 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);
+ }
+ }
+ }
+
#ifndef Q_WS_QWS // Almost cross-platform :-)
void setWSGeometry(bool dontShow=false, const QRect &oldRect = QRect());