Skip to content

Fix the behavior of dropping an URL on a WebEngineView with Qt 5.15.5

In versions of Qt before 5.15.5 QWebEngineView didn't allow to open remote URLs by dropping them. With Qt 5.15.5, instead, they're always opened in a new tab. This restore the old behavior of opening them in the view where they have been dropped (unlike before, this also happens for local URLs).

Since QtWebEngine doesn't provide a way to change its behavior and that we can't completely override it because we can't know, for example, if the URL has been dropped on the area for uploading a file, we have to use a timer with an arbitrary value during which WebEnginePage::createWindow returns the page itself instead of creating a new page.

BUG: 449073

Merge request reports