<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QtQuick.LocalStorage dont work properly with qmlscene from Qt Designer Studio]]></title><description><![CDATA[<p dir="auto">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.</p>
<p dir="auto">Explored Qt sources i found <a href="http://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/imports/localstorage/plugin.cpp?h=dev" target="_blank" rel="noopener noreferrer nofollow ugc">source of localstorage plugin</a> where was this part</p>
<pre><code>QString basename = args-&gt;v4engine()-&gt;qmlEngine()-&gt;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;
</code></pre>
<p dir="auto">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.</p>
<p dir="auto">Have somebody ideas how fix it or other way to use localstorage in QMLscene tool ?</p>
]]></description><link>https://forum.qt.io/topic/96013/qtquick-localstorage-dont-work-properly-with-qmlscene-from-qt-designer-studio</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 15:18:17 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/96013.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 27 Oct 2018 17:35:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QtQuick.LocalStorage dont work properly with qmlscene from Qt Designer Studio on Mon, 29 Oct 2018 17:30:07 GMT]]></title><description><![CDATA[<p dir="auto">Problem is bug and not decided. I found new way to store local data by write wrapers for Qt.lab.settings instantiated in Singleton qml file.</p>
]]></description><link>https://forum.qt.io/post/489818</link><guid isPermaLink="true">https://forum.qt.io/post/489818</guid><dc:creator><![CDATA[leoleo]]></dc:creator><pubDate>Mon, 29 Oct 2018 17:30:07 GMT</pubDate></item></channel></rss>