QtQuick.LocalStorage dont work properly with qmlscene from Qt Designer Studio
-
When I run Qmlscene preview from Qt Designer Studio trial , for standart example project (Clock ) which using QtQuick.LocalStorage it dont work. Log showing Error: LocalStorage: can't create path C:\Users\leo\AppData\Local\QtProject\QtQmlViewer\QML\OfflineStorage\Databases from LocalStorage.openDatabaseSync(...) function.
Explored Qt sources i found source of localstorage plugin where was this part
QString basename = args->v4engine()->qmlEngine()->offlineStorageDatabaseFilePath(dbname); QFileInfo dbFile(basename); if (!QDir().mkpath(dbFile.dir().absolutePath())) { const QString message = QQmlEngine::tr("LocalStorage: can't create path %1").arg(QDir::toNativeSeparators(dbFile.dir().absolutePath())); V4THROW_SQL2(SQLEXCEPTION_DATABASE_ERR, message); } QString dbid = dbFile.fileName(); bool created = false; QString version = dbversion; QSqlDatabase database;So I think there is some problem to open/create database file on default path for qt projects by qmlscene. I cant change default path and cant set offlineStorage(path) becouse i have not access to C++ code (its .qmlproject). When I run project (not using menu item "QML Preview") or build it with C++ qmlengine loader its working normal with localstorage, but when i try to preview via QML scene tool from Qt Design Studio its show error.
Have somebody ideas how fix it or other way to use localstorage in QMLscene tool ?