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

QWebEngine - immediate crash on load() or setUrl()



  • I'm using Qt 5.1 and trying to make a very simple browser wrapper/test to run on Windows 10. Win10 is 64bit but I am compiling a 32bit application with Qt.

    My MainWindow really just does this:

    QWebEngineView* view = new QWebEngineView(this);
    setCentralWidget(view);
    view->load(QUrl("http://www.google.com"));
    

    On my development PC it works fine in debug and release mode.

    I've copied all of the DLL's onto my Win10 PC (which does not have Qt installed)

    if I omit the call to view->load() the application opens fine.

    if I keep the call to load() in place (or, even if I try setURL()) then my application opens and then immediately closes. There is no exception or runtime error thrown that I can see.

    What might I be doing wrong?



  • you probably did not deploy the webengine plugin. could you try using windeployqt to deploy your application and see if that solves the problem?



  • Thanks for replying.
    I will look into windeployqt

    But I do have the /plugins/qtwebengine/ in my runtime path and a qt.conf which points to it, it still fails.



  • Thank you, windeployqt was very easy to use and solved the problem.


Log in to reply