summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-06-03 08:29:24 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-06-04 07:22:00 (GMT)
commitefcc087e7da35f6db0e544f48493626f4fa2d56a (patch)
tree010192254f1119850de37f4b300664d8d7f1b1c3 /src/gui/graphicsview
parent7aee6cbe3da5e63eba1fd41feadf53c02819cf4a (diff)
downloadQt-efcc087e7da35f6db0e544f48493626f4fa2d56a.zip
Qt-efcc087e7da35f6db0e544f48493626f4fa2d56a.tar.gz
Qt-efcc087e7da35f6db0e544f48493626f4fa2d56a.tar.bz2
In QGraphicsView the viewport itself has to be enabled for InputMethods.
When events are comming, exactly that widget will be aske for InputContext.
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index a795fb4..8137f8e 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -1195,6 +1195,11 @@ QGraphicsView::QGraphicsView(QWidget *parent)
// using a simple reference count. The same goes for acceptDrops and mouse
// tracking.
setAttribute(Qt::WA_InputMethodEnabled);
+
+ // viewport part of the graphics view has to be enabled
+ // as well, because when events come this widget is asked
+ // for input context and so on
+ viewport()->setAttribute(Qt::WA_InputMethodEnabled);
}
/*!
@@ -1209,6 +1214,11 @@ QGraphicsView::QGraphicsView(QGraphicsScene *scene, QWidget *parent)
setAcceptDrops(true);
setBackgroundRole(QPalette::Base);
setAttribute(Qt::WA_InputMethodEnabled);
+
+ // viewport part of the graphics view has to be enabled
+ // as well, because when events come this widget is asked
+ // for input context and so on
+ viewport()->setAttribute(Qt::WA_InputMethodEnabled);
}
/*!
@@ -1221,6 +1231,11 @@ QGraphicsView::QGraphicsView(QGraphicsViewPrivate &dd, QWidget *parent)
setAcceptDrops(true);
setBackgroundRole(QPalette::Base);
setAttribute(Qt::WA_InputMethodEnabled);
+
+ // viewport part of the graphics view has to be enabled
+ // as well, because when events come this widget is asked
+ // for input context and so on
+ viewport()->setAttribute(Qt::WA_InputMethodEnabled);
}
/*!