Qt Quick 示例 - 本地存储
一组 QML 本地存储示例。

“本地存储”是一组与Qt Quick 的本地存储功能相关的小型 QML 示例。
运行示例
您可以通过以下方式运行示例:
- Qt Creator
打开Welcome 模式,并从Examples 中选择该示例。有关更多信息,请参阅Qt Creator :教程:构建和运行。
- Qt Extension for Visual Studio Code
在Command Palette 中执行Qt: Open Qt examples 命令,然后从列表中选择该示例。有关详细信息,请参阅Qt Extension for Visual Studio Code :教程:构建和运行。
活动追踪器
活动追踪器可帮助您记录散步、徒步或骑行行程。
所有数据库事务都在 Database.js 中处理。系统会在启动时检查数据库,若不存在则自动创建。LocalStorage 使用 SQLite,这是一种自包含、无服务器且属于公共领域的数据库。与数据库建立连接的操作会在每个用于操作或检索数据的函数开头进行处理。
© 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.