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

Download file in qmlapplication engine



  • How to download file in qqmlapplicationengine?
    I downloaded the file qtnetworkaccess manager in gui,If I use the same thing in qqmlapplication engine,I get the following error.

    @main.cpp

    QObject::connect: No such slot QQmlApplicationEngine::slotFinished()


  • Lifetime Qt Champion

    Hi,

    Because there is no such slot in that class.

    What exactly are you trying to do with it ?



  • I want to download an image or some files and write it in new file using qqmlapplication.



  • @main.cpp
    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    //download_asset();
    download call;
    QQmlApplicationEngine engine;
    call.download_asset();
    }
    void download::download_asset()
    {
    QObject::connect(reply,SIGNAL(finished()),this,SLOT(slotFinished()));
    }
    @
    I call download_asset function from main using object "call".But If I debug "this" it shows qqmlengine but I need download on that part.


  • Lifetime Qt Champion

    Since you marked the thread as solved, what was the solution you found ?



  • I found the alternate solution.I am not using qqmlapplication engine.I downloaded the video and show the video output in quick view.


Log in to reply