Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. ComboBox qml with SQLite list
Forum Updated to NodeBB v4.3 + New Features

ComboBox qml with SQLite list

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 328 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    filipdns
    wrote on last edited by
    #1

    Hello, do you know how can I have the comboBox list populated with the "description" column of my SQLite table using JS query:

    function combobox()
    {
        var db = dbGetHandle()
        db.transaction(function (tx) {
            var results = tx.executeSql(
                        'SELECT description FROM part_log order by description asc')
            for (var i = 0; i < results.rows.length; i++) {
                listModel.append({
                                     id: results.rows.item(i).rowid,
                                     checked: " ",
                                     description:results.rows.item(i).description
                                 })
            }
        })
    }
    

    thanks a lot for your help

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved