このページでは

Qt Quick 例 - ローカルストレージ

QMLのローカルストレージに関するサンプル集です。

日付、説明、距離が表示される旅行記録機能を備えたアクティビティトラッカー

ローカルストレージは、Qt Quick のローカルストレージ機能に関連する、小規模なQMLサンプル集です。

例の動作確認

以下の手順でサンプルを実行できます:

アクティビティトラッカー

アクティビティトラッカーを使用すると、散歩、ハイキング、サイクリングの記録を残すことができます。

すべてのデータベーストランザクションは `Database.js` で処理されます。起動時にデータベースの有無が確認され、存在しない場合は作成されます。`LocalStorage` では、自己完結型でサーバーレス、パブリックドメインのデータベースである SQLite を使用しています。データベースへの接続は、データを操作または取得する各関数の冒頭で処理されます。

サンプルプロジェクト @ code.qt.io

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.