Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. C++ library with webAssembly: A success: But only white html page
Forum Updated to NodeBB v4.3 + New Features

C++ library with webAssembly: A success: But only white html page

Scheduled Pinned Locked Moved Solved Installation and Deployment
9 Posts 2 Posters 1.1k Views 1 Watching
  • 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 Offline
    I Offline
    Izza
    wrote on last edited by
    #1

    what did i miss?
    It has generated all files :
    .wasm
    .html
    .js

    and when i run on Firefox : it shows white page only ????

    1 Reply Last reply
    0
    • I Offline
      I Offline
      Izza
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • I Offline
        I Offline
        Izza
        wrote on last edited by
        #3

        0_1556874144208_Capture.PNG

        No errors ...

        raven-worxR 1 Reply Last reply
        0
        • I Izza

          0_1556874144208_Capture.PNG

          No errors ...

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by raven-worx
          #4

          @Izza
          check for errors in the Browser console

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • I Offline
            I Offline
            Izza
            wrote on last edited by
            #5

            0_1556893003516_Capture.PNG

            Having these path invalid, I added them into my .pro file,
            ran qmake to create new makefile and run make all overagain.
            Still its missing on these resources.

            1 Reply Last reply
            0
            • I Offline
              I Offline
              Izza
              wrote on last edited by
              #6

              I need a help please, this issue is not getting resolved.

              js extension is a customised class written for the sam elibrary i am working on.

              raven-worxR 1 Reply Last reply
              0
              • I Izza

                I need a help please, this issue is not getting resolved.

                js extension is a customised class written for the sam elibrary i am working on.

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by
                #7

                @Izza
                where is qrc://QcStyle supposed to come from?

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  Izza
                  wrote on last edited by
                  #8

                  ![alt text](0_1557389495947_Capture.PNG image url)

                  It is directory highlighted in the attached image, all the .js files are inside JSEXtension folder.

                  below is my class that calls JSExtension::install to install these:
                  namespace Qc {
                  namespace Style {

                      // ---------------------------------------------------------------------------------------------------- static methods
                      bool JSExtension::install(QQmlEngine &engine, const QString &qrcPath)
                      {
                          // check valid qrc path
                          QString path = QQmlFile::urlToLocalFileOrQrc(qrcPath);
                          if (path.isEmpty() ||
                              !QFile::exists(path)) {
                  
                              //qWarning("Failed to install js extensions '%s' : invalid qrc path", qrcPath.toStdString().c_str());
                  			qWarning("Failed to install js extensions '%s' : invalid qrc path", path.toStdString().c_str());
                              return false;
                          }
                  
                          // get extension
                          QFile file(path);
                          if (!file.open(QIODevice::ReadOnly))
                          {
                              qWarning("Failed to install js extensions '%s': don't open extension file", qrcPath.toStdString().c_str());
                              return false;
                          }
                  
                          QByteArray byteArray = file.readAll();
                          file.close();
                  
                          QJSValue extension = engine.evaluate(QString(byteArray));
                          if (extension.isError()) {
                              qWarning("Failed to install js extensions '%s': don't evaluate extension file", qrcPath.toStdString().c_str());
                              return false;
                          }
                  
                          return true;
                      }
                  
                  }
                  

                  }

                  1 Reply Last reply
                  0
                  • I Offline
                    I Offline
                    Izza
                    wrote on last edited by Izza
                    #9

                    RESOLVEd: it was access permissions i need to change in my system
                    chmod 777 :/
                    Also by adding prefix /QcStyle/ in my qrc for C++ library

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved