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

change offlineStoragePath qml



  • Hello, I want to update the local data base by delete it and replace it by master database.

    directly copy the master to local make it fail.

    then I want to change offlineStoragePath :

    first, I want to set the location of the local database with:

    main.cpp

    QQmlApplicationEngine engine;
    engine.rootContext()->setContextProperty("engine", &engine);
    engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
    

    main.qml

    Component.onCompleted:
        {engine.offlineStoragePath="E:/database"}
    

    but it's not working

    Could you help me?

    thank you very much


Log in to reply