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



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

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



  • This post is deleted!


  • 0_1556874144208_Capture.PNG

    No errors ...


  • Moderators

    @Izza
    check for errors in the Browser console



  • 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.



  • 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.


  • Moderators

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



  • ![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;
        }
    
    }
    

    }



  • 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


Log in to reply
 

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