Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Retrieving data from Sqlite database and plot it in chart for qt application
Forum Updated to NodeBB v4.3 + New Features

Retrieving data from Sqlite database and plot it in chart for qt application

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 5.5k 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.
  • M Offline
    M Offline
    Mittu
    wrote on last edited by
    #1

    Is there any existing example that requires data to be retrieved from Sqlite database and plot it in pie or bar charts?
    Based on the one field from the database how to draw the charts in qt? Any help .....

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      "Qt examples":http://qt-project.org/doc/qt-5/qtexamplesandtutorials.html#examples

      Also there are links to all examples in QtCreator.
      If you downloaded Qt from this site then open QtCReator and select "Examples" button on a "Welcome" page.
      You can search there by sql or by charts.

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

        i saw the examples.but i want data to be retrieved from sqlite database and plot it in pie or bar charts.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          You would need to do that in three steps.

          get the data from your database

          build the plot data from it (loop on the QSqlQuery result)

          refresh the plot

          For the plotting part, you might be interested by "Qwt":http://qwt.sourceforge.net

          Hope it helps

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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