Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User bartek1963's Avatar
    Join Date
    Apr 2012
    Posts
    7
    hi,
    how i can use a sqlite table (insert, delete, update) in qml page?

  2. #2
    Registered User lemonlinger's Avatar
    Join Date
    May 2012
    Posts
    5
    hi, i use it in my app. The functions about sql operations are written in Javascript file, and called in qml page.
    Like in JS files:
    Code:
    function loadConf(){
        var db = openDatabaseSync("MatchWordsConf", "1.0", "MatchWords Game Configuration",100);
        var dataStr = "SELECT * FROM Conf"
        db.transaction(
                    function(tx){
                        tx.executeSql('CREATE TABLE IF NOT EXISTS Conf(sound NUMBER, music NUMBER, dict TEXT, mode TEXT)');
                        var rs = tx.executeSql(dataStr);
                        console.log("rs.length=" + rs.rows.length);
                        if(rs.rows.length === 0){
                            console.log("noting in conf")
                        }
                    }
                    );
    }
    
    function saveConf(sound, music, mode){
        var db = openDatabaseSync("MatchWordsConf", "1.0", "MatchWords Game Configuration",100);
        var dataStr = "INSERT INTO Conf VALUES(?, ?, ?, ?)";//sound,music,dict,mode
        var data = [sound, music, g_Dict, mode];
        db.transaction(
                    function(tx) {
                        tx.executeSql('CREATE TABLE IF NOT EXISTS Conf(sound NUMBER, music NUMBER, dict TEXT, mode TEXT)');
                        tx.executeSql('DELETE FROM Conf');
                        tx.executeSql(dataStr, data);
                        console.log("save OK");
                    }
                    );
    }

  3. #3
    Nokia Developer Expert izinin's Avatar
    Join Date
    Oct 2007
    Posts
    441
    You can use QML offline storage api http://doc.qt.nokia.com/4.7-snapshot...ne-storage-api

  4. #4
    Registered User bartek1963's Avatar
    Join Date
    Apr 2012
    Posts
    7
    thank so much

  5. #5
    Registered User bartek1963's Avatar
    Join Date
    Apr 2012
    Posts
    7
    can i create a in qml a data entry (sql)?

  6. #6
    Registered User bartek1963's Avatar
    Join Date
    Apr 2012
    Posts
    7
    Im creating a menu using QML. In the first QML there are some mousearea and each of these sends to another state. Can i create in the next states a data entry or is better use another system ....example form?

  7. #7
    Nokia Developer Expert izinin's Avatar
    Join Date
    Oct 2007
    Posts
    441
    Hi

    For UI elements (and menu as well) -- it would be better to use QComponents . QComponents ensures your application is in the line with Nokia device application style and user interaction manner. Besides that QComponents saves your time on UI design and implementation. Don't use plain QML

  8. #8
    Registered User bartek1963's Avatar
    Join Date
    Apr 2012
    Posts
    7
    thanks i will do

  9. #9
    Registered User bartek1963's Avatar
    Join Date
    Apr 2012
    Posts
    7
    have you any example or documentatio?

  10. #10
    Nokia Developer Expert izinin's Avatar
    Join Date
    Oct 2007
    Posts
    441
    Hi

    QComponents are slightly different for Harmattan and Symbian but as for Menu element -- they are the same . Please check QComponents reference http://harmattan-dev.nokia.com/docs/...onentlist.html and http://doc.qt.nokia.com/qt-component...omponents.html.

    Each element description is provided with sample.

    Another good resource for QComponents is QComponents application gallery that will give you idea how to use QComponents available elements http://projects.developer.nokia.com/...on/downloads/6

  11. #11
    Registered User bartek1963's Avatar
    Join Date
    Apr 2012
    Posts
    7
    Hi,
    i have a Symbian (Symbian OS v9.4) device. Can i import QtQuick 1.1 using QtSDK 1.1.2?

  12. #12
    Nokia Developer Expert izinin's Avatar
    Join Date
    Oct 2007
    Posts
    441
    Hi

    You cannot

    Only Qt Quick 1.0 and Qt 4.7.3 is available for S60 5th Edition devices.

    However Qt Quick Components is open source so nothing prevents a Qt Quick 1.0 application designed for S60 5th to take QML files for components from Qt Quick Components repository (http://qt.gitorious.org/qt-components) and include it in your project, perhaps with some modification

Similar Threads

  1. [moved] Smart Installer and SQLite
    By kls_ in forum [Archived] Nokia Smart Installer for Symbian
    Replies: 1
    Last Post: 2011-03-28, 17:04
  2. [moved] how to update table ?
    By nokia_lin in forum Symbian C++
    Replies: 2
    Last Post: 2009-09-11, 09:46
  3. [moved] Setting page problem
    By shahidur.rahman in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2009-04-25, 17:40
  4. [Moved] Bookmark a web page
    By bagdair in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2008-05-29, 12:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved