Windeployqt & (qml) WebView not working



  • Hi,
    i just replaced QtWebEngine with WebView.
    Now when i run windeployqt and start my application from the resulting deployment the webview stuff doesn't work. It shows no webview, just a white widget (It's a quickwidget which uses the webveiw). Running my app directly from qtcreator works fine.

    Any ideas what's wrong?
    Here is a list of the webview libs inside my deployment folder:

    webview\qtwebview_webengine.dll
    Qt5WebView.dll
    Qt5WebEngine.dll
    Qt5WebEngineCore.dll
    Qt5WebChannel.dll

    And also the QtWebEngineProcess.exe is there

    Greetings
    Nando



  • I think this is a bad methode but i'm doing this when i have no idea what is missing :

    copy your .exe inside your Qt dir :
    exemple for app using qt5.11 with minGw

    C:\Qt\5.11.0\mingw53_32\bin
    

    run your .exe. If it works, copy the full dir C:\Qt\5.11.0\mingw53_32\bin to another location and delete everything your app don't need...



  • @Nando
    can you post your windeployqt call ? I have the feeling that you may have made an error with the --qmldir paramter.



  • @J.Hilk Hi,
    i have only 1 qml file (the one with the webview) and it is included inside my resource file.

    I also tried to specifiy the qml when running windeployqt like this:

     %QTDIR%\bin\windeployqt --release -qmldir C:\DEVELOPMENT\qtcreator-workspace\myapp\misc\resources\qml   --dir %GENERATION_DIR% %AEL_EXECUTABLE%
    

    But i think the -qml is not needed if the qml file is inside the resources, right?



  • @Nando
    Yes and no, all QML files you create, you have the option to pack into your binary, or ship seperaterly, true. But everything that comes from Qt, also everyting you include with an Import has to be shipped with your exe. Same as DLL‘s.

    IIRC you need to prepend a - to -qmldir -> —qmldir for the windeploy tool to find it.



  • @J.Hilk said in Windeployqt & (qml) WebView not working:

    —qmldir

    Thank you very much!!!!! That was exactly my mistake.... -qml instead of --qml when runnign windeployqt

    Now it works as excpeted! Thank you very much...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.