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 get data from SQLite to bidding tableview (QML)
QtWS25 Last Chance

How to get data from SQLite to bidding tableview (QML)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qml bindingqml
4 Posts 2 Posters 1.5k 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.
  • T Offline
    T Offline
    TuanLT
    wrote on 27 Oct 2015, 07:25 last edited by
    #1

    Hi,
    I need to bindding data from SQLite to TableView using QML.
    Currently, I using ListModel for make suorce Tableview.
    But, i don't know, how to get data from database and mapping with ListModel (each ListElement of ListModel).
    Can you help me solve this problem.
    Thanks

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hpollak
      wrote on 27 Oct 2015, 08:11 last edited by
      #2

      Maybe this helps: QML and QSqlTableModel

      1 Reply Last reply
      1
      • T Offline
        T Offline
        TuanLT
        wrote on 27 Oct 2015, 08:38 last edited by
        #3

        Thanks hpollak!

        When i see topic https://forum.qt.io/topic/59909/binding-list-from-c-to-qml
        I do not understand how it's running?
        I have a List object in cpp file, and i want binding to gridview on qml file. Which supports updating data when i change value on a item selected?

        Thanks,
        Tuan

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hpollak
          wrote on 28 Oct 2015, 06:28 last edited by
          #4

          The TableView gets the data by the data(.....) - Methode to indicate the data is changed, the dataChanged(..) signal should be emitted.

          1 Reply Last reply
          0

          3/4

          27 Oct 2015, 08:38

          • Login

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