summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qcoreevent.h1
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h
index babb89d..75af3e7 100644
--- a/src/corelib/kernel/qcoreevent.h
+++ b/src/corelib/kernel/qcoreevent.h
@@ -324,6 +324,7 @@ private:
friend class QGraphicsView;
friend class QGraphicsViewPrivate;
friend class QGraphicsScenePrivate;
+ friend class QGraphicsWidget;
};
class Q_CORE_EXPORT QTimerEvent : public QEvent
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 157fbe5..033723a 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -168,6 +168,8 @@ QT_BEGIN_NAMESPACE
\sa QGraphicsProxyWidget, QGraphicsItem, {Widgets and Layouts}
*/
+bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event);
+
/*!
Constructs a QGraphicsWidget instance. The optional \a parent argument is
passed to QGraphicsItem's constructor. The optional \a wFlags argument
@@ -1097,7 +1099,11 @@ QVariant QGraphicsWidget::propertyChange(const QString &propertyName, const QVar
*/
bool QGraphicsWidget::sceneEvent(QEvent *event)
{
- return QCoreApplication::sendEvent(this, event) || QGraphicsItem::sceneEvent(event);
+ bool spont = event->spontaneous();
+ if (spont ? qt_sendSpontaneousEvent(this, event) : QApplication::sendEvent(this, event))
+ return true;
+ event->spont = spont;
+ return QGraphicsItem::sceneEvent(event);
}
/*!