- 
    
Bug
 - 
    Resolution: Done
 - 
    
P2: Important
 - 
    5.12.0 Beta 1
 - 
    None
 - 
    Windows 10; Version 1803
 
- 
        
 - 
        29ea287716175b57aa7b050b70eb3eb5c9049464 (qt/qtbase/5.12.1)
 
Widgets created with QWidget::createWindowContainer and put into a QMdiArea jumps erratically around when dragging them around on top of other similar widgets. This gets worse the more windows that there are in the QMdiArea.
Steps to reproduce:
- Create a QMdiArea and put multiple (8+) QQuickView or Qt3DWindow windows into the mdi area using createWindowContainer and addSubWindow.
 - Click the title bar of one of the windows and hold the mouse down.
 - Start moving the mouse to drag the window around.
 - Drag the window around on top of other widgets.
 
Result: The dragged window jumps around when dragging; if releasing the mouse at an unlucky time the window will appear at a random location or somewhere off screen.
This is an issue in the 5.12.0 alpha and beta 1. The issue is not present in 5.11.2.
I can reproduce it with the following code (both with the Qt3D windows and Qml windows):
#include <QApplication>
#include <QMainWindow>
#include <QMdiArea>
#include <QMdiSubWindow>
#include <QQuickView>
#include <QWidget>
#include <Qt3DWindow>
void add3DWindow(QMdiArea *mdiArea) {
  auto *window = new Qt3DExtras::Qt3DWindow();
  auto *widget = QWidget::createWindowContainer(window);
  auto *mdiWindow = mdiArea->addSubWindow(widget);
  mdiWindow->resize(500, 500);
}
void addQmlWindow(QMdiArea *mdiArea) {
  QQuickView *window = new QQuickView();
  auto *widget = QWidget::createWindowContainer(window);
  auto *mdiWindow = mdiArea->addSubWindow(widget);
  mdiWindow->resize(500, 500);
}
void addMdiArea(QMainWindow *window) {
  auto *mdiArea = new QMdiArea(window);
  window->setCentralWidget(mdiArea);
  auto addWindow = [&] { addQmlWindow(mdiArea); };
  addWindow();
  addWindow();
  addWindow();
  addWindow();
  addWindow();
  addWindow();
  addWindow();
  addWindow();
  addWindow();
}
int main(int argc, char *argv[]) {
  QApplication app(argc, argv);
  QMainWindow window;
  addMdiArea(&window);
  window.showMaximized();
  return app.exec();
}
And with this build file:
TARGET = mditest
TEMPLATE = app
CONFIG += c++11
QT += \
    core \
    gui  \
    widgets \
    3dextras \
    quick
SOURCES += \
        main.cpp
- resulted from
 - 
                    
QTBUG-60437 add full-featured Windows Ink support: generate QTabletEvents
-         
 - Closed
 
 -