Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More documentation about importing LocalStorage module from Javascript
Task-number:QTBUG-24478
Change-Id: Iad0fe15e8b2f1fcfa82b1654c3fd606d08563457
Reviewed-by: Martin Jones <martin.jones@nokia.com>
  • Loading branch information
yinyunqiao authored and Qt by Nokia committed Mar 5, 2012
1 parent 1815459 commit 36bd7f6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion doc/src/localstorage/localstorage.qdoc
Expand Up @@ -33,9 +33,24 @@ The local storage API provides a JavaScript interface to an SQL relational
database. The QtQuick.LocalStorage module contains the API and it may be given
a namespace.

Import QtQuick.LocalStorage module from QML:
\code
import QtQuick.LocalStorage 2.0 as SQL
//sql.qml

import QtQuick.LocalStorage 2.0 as Sql
\endcode


Import QtQuick.LocalStorage module from JavaScript:
\code
//sql.js
.import QtQuick.LocalStorage 2.0 as Sql
\endcode

Note, importing a module from JavaScript is different from importing from QML.
The \l{JavaScript Code} article contains detailed information on importing in JavaScript code.


\section2 Database API

The \c openDatabaseSync() and related functions
Expand Down

0 comments on commit 36bd7f6

Please sign in to comment.