diff options
-rw-r--r-- | src/gui/kernel/qwindow.h | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qwindowcontainer.cpp | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 0d13cfa648..40bfad908f 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -85,6 +85,7 @@ class QPlatformWindow; class QBackingStore; class QScreen; class QAccessibleInterface; +class QWindowContainer; class Q_GUI_EXPORT QWindow : public QObject, public QSurface { @@ -359,6 +360,7 @@ private: friend class QGuiApplication; friend class QGuiApplicationPrivate; + friend class QWindowContainer; friend Q_GUI_EXPORT QWindowPrivate *qt_window_private(QWindow *window); }; diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp index dc35dee1a9..206a265761 100644 --- a/src/widgets/kernel/qwindowcontainer.cpp +++ b/src/widgets/kernel/qwindowcontainer.cpp @@ -206,6 +206,7 @@ QWindowContainer::QWindowContainer(QWindow *embeddedWindow, QWidget *parent, Qt: d->window = embeddedWindow; d->window->setParent(&d->fakeParent); + setAcceptDrops(true); connect(QGuiApplication::instance(), SIGNAL(focusWindowChanged(QWindow*)), this, SLOT(focusWindowChanged(QWindow*))); } @@ -298,6 +299,13 @@ bool QWindowContainer::event(QEvent *e) } } break; +#ifndef QT_NO_DRAGANDDROP + case QEvent::Drop: + case QEvent::DragEnter: + case QEvent::DragMove: + case QEvent::DragLeave: + return d->window->event(e); +#endif default: break; } |