Description
I got an infinite loop when using QWebEngineView, this way:
- I create a QWebEngineView, and call setHtml()
- During the Html loading, the "RenderWidgetHostViewQtDelegateWidget::setKeyboardFocus" calls "QGuiApplication::sync()"
- If the page takes more than 5 seconds to load, my application aborts and tries to load another QWebEngineView, posting a message to Qt
- This new QWebEngineView receives the message to load during this QGuiApplication::sync, and starts the same loop all over again.
This really isn't a "normal" application flow, but the point is, I thing calling QGuiApplication::sync is a very bad idea, many things can happen in the event loop, even deleting the currently running QWebEngineView.
The QGuiApplication::sync comments even says:
"This function is timeconsuming and its use is discouraged."
This was the commit that introduced this:
Attachments
Issue Links
- relates to
-
QTBUG-59080 Crash on opening link in new window
- Closed
- resulted from
-
QTBUG-56652 QWebEngineView does not get keyboard focus in some cases
- Closed