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.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index f4cd61a..8e58498 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -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());