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

WindeployQT QTVirtualKeyboard not working after deployment



  • Hello,

    After installing my Qt Application on windows (using WindeployQT) there is no sign of the QTVirtualKeyboard, when developing it works like a charm, but it seems to be missing some files on deployment.
    This is what I found out so far in the Qt Creator:

    1228441d-3056-4e43-ae40-92d4aaad31b3-image.png

    These are screenshots from the two error lines:

    2e149e86-b66a-4ebc-9b18-9b5cf3234be7-image.png

    838af96e-63ab-4377-9abb-db57bbac6f68-image.png
    Any suggestions on where I could start resolving this issue? :-)

    Kind regards,
    Yina


  • Moderators

    @Yina
    some observations:

    1. you are using windeployqt on a debug build
    2. your --qmldir parameter points to the Qt dirs qml directory, which in the end will copy almost everything from Qt

    What also would be interesting is the output with the envvar QML_IMPORT_TRACE=1. For example use
    qputenv("QML_IMPORT_TRACE","1") in your main() and then via the debug menu in QtCreator start an external application to attach the debugger and see the output of your deployed application.


  • Moderators

    @Yina
    the error says it couldn't resolve ListModel type (used by the virtual keyboard).

    windeployqt scans the qml files of your project. My guess is you are not using the QtQml.Models qml import anywhere in your project and thus the qml plugin isn't included in the deployment and missing in the end.

    you could use import QtQml.Models 2.15 in any qml file and run windeployqt again.



  • @raven-worx Dear Raven, I have tried your solution, but without success.
    Below you can find the link of the verbose2 command, am I wrong to think that QtQml.Models is correctly imported?
    I am are using QtQml.Models 2.2

    Kind regards,
    Yina
    Output Verbose:
    https://we.tl/t-ru2wH94uHl


  • Moderators

    @Yina
    some observations:

    1. you are using windeployqt on a debug build
    2. your --qmldir parameter points to the Qt dirs qml directory, which in the end will copy almost everything from Qt

    What also would be interesting is the output with the envvar QML_IMPORT_TRACE=1. For example use
    qputenv("QML_IMPORT_TRACE","1") in your main() and then via the debug menu in QtCreator start an external application to attach the debugger and see the output of your deployed application.



  • @raven-worx
    Thank you very much for your time, my issue is resolved :-)

    It was indeed the debug build causing the issue, and I am using the correct qlmdir to avoid unnecessary imports.

    Thank you again and have a nice day!