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. How to show data from database in a ListView ?
Forum Updated to NodeBB v4.3 + New Features

How to show data from database in a ListView ?

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.4k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Sparkle24
    wrote on last edited by
    #1

    Can anybody explain how to show data from database in QML list view?
    I've created a database with sqlite but I'm unable to show data in a list view.
    I don't want to use C++...
    please help me...

    1 Reply Last reply
    0
    • M Offline
      M Offline
      melghawi
      wrote on last edited by
      #2

      I do not believe it is possible without writing some custom c++ code. "QML Model Types":http://qt-project.org/doc/qt-5.0/qtquick/qtquick-qmltypereference.html#model-view-types-and-data-storage-and-access. Have a look at this "QSqlQueryModel in QML":http://qt-project.org/wiki/How_to_use_a_QSqlQueryModel_in_QML.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        melghawi
        wrote on last edited by
        #3

        Further research shows that this might be possible.

        Take a look at "this.":http://qt-project.org/doc/qt-5.0/qtquick/qmlmodule-qtquick-localstorage2-qtquick-localstorage-2.html

        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