Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Supporting dragging from a QWebEngineView to other QWidget in app



  • Hi all,

    We are in the process of updating Qt from 5.4.1 to 5.12.3 and we stumbled upon some issue with dragging from a QWebEngineView to other QWidget. Our current approach was to create a QDrag that gets hooked into the webpage's document.onmousemove. This worked fine in Qt 5.4.1 but in 5.12.3 it seems to cause the QWebEngineView to freeze after a few drag and drop. A suspicion looking warning also started appearing after the Qt update:

    "QDragManager::drag in possibly invalid state"

    Digging into Qt's code, it seems there what looks like new code in QWebEnginePage that is handling drag and drop as well and that is creating a QDrag object of its own. I suspect this is what is causing the QWebEngineView to freeze. The rest of the application is still working though. Does anyone know much about the QWebEnginePage's drag and drop and if they have a preferred way in Qt 5.12.3 to handle dragging from QWebEngineView to other QWidget?


Log in to reply