Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved SQL with WebAssembly

    General and Desktop
    5
    6
    1223
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      Infinity last edited by

      I would like to compile my application for WebAssembly. The animatedtiles example as described in this article https://blog.qt.io/blog/2019/03/05/using-docker-test-qt-webassembly/ works without any problems. In my application I use the sql module. If I want to compile it I get the following error:

      Info: creating stash file /project/build/.qmake.stash
      cd address/ && ( test -e Makefile || /usr/local/Qt-5.13.1/bin/qmake -o Makefile /project/source/address/address.pro ) && make -f Makefile 
      cd user/ && ( test -e Makefile || /usr/local/Qt-5.13.1/bin/qmake -o Makefile /project/source/user/user.pro ) && make -f Makefile 
      cd login/ && ( test -e Makefile || /usr/local/Qt-5.13.1/bin/qmake -o Makefile /project/source/login/login.pro ) && make -f Makefile 
      Project ERROR: Unknown module(s) in QT: sql
      Makefile:50: recipe for target 'sub-address-make_first' failed
      make: *** [sub-address-make_first] Error 3
      make: *** Waiting for unfinished jobs....
      Project ERROR: Unknown module(s) in QT: sql
      Project ERROR: Unknown module(s) in QT: sql
      Makefile:152: recipe for target 'sub-user-make_first' failed
      Makefile:127: recipe for target 'sub-login-make_first' failed
      make: *** [sub-user-make_first] Error 3
      make: *** [sub-login-make_first] Error 3
      

      Why is the sql module not found?

      JonB L 2 Replies Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        AFAIK, the QtSql module is currently not available for web assembly.

        @lorn-potter might be able to shed some more light on it.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 2
        • JonB
          JonB @Infinity last edited by JonB

          @infinity , @SGaist
          I asked this recently See the response I got at https://forum.qt.io/topic/105944/qt-for-webassembly-widget-example-gone/18

          1.I understand about limitations like no local files, no sub-processes. What about MySQL database access via the Qt classes? Do I assume you cannot have your code access SQL db from browser?

          Not at this point. Although someone has now ported sqlite to wasm, which would be the first step.

          1 Reply Last reply Reply Quote 2
          • lorn.potter
            lorn.potter last edited by lorn.potter

            Someone has ported sqlite to wasm...
            https://github.com/fluencelabs/sqlite

            You could start with that.
            I am unclear if any work on the Qt side would be needed to get Qt compiled with support for sqlite.

            Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
            Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

            1 Reply Last reply Reply Quote 0
            • L
              Libra @Infinity last edited by

              @Infinity Hi, Did you get any solution of this Qt module not found issue while building webassembly project

              1 Reply Last reply Reply Quote 0
              • I
                Infinity last edited by

                No. I switched from MySQL to SQLite.

                1 Reply Last reply Reply Quote 2
                • First post
                  Last post