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. Query a sqlite database from QML and/or Javascript?
Forum Updated to NodeBB v4.3 + New Features

Query a sqlite database from QML and/or Javascript?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 1.2k 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.
  • B Offline
    B Offline
    bundito
    wrote on last edited by
    #1

    Hi! First post!

    I'm trying to develop a desktop widget for KDE Plasma using QML. I've got a bunch of text (random quotes and sayings) in a sqlite database.

    Is there any way I can query this database?

    I know I could write a Qt/C++ backend, but the fact that it needs to be compiled makes distributing it a lot more complicated.

    Any suggestions?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to the forums.
      There is
      http://doc.qt.io/qt-5/qtquick-localstorage-qmlmodule.html
      which is pure QML.

      1 Reply Last reply
      1
      • B Offline
        B Offline
        bundito
        wrote on last edited by
        #3

        Right, I've studied that. But there's no way to place an existing database into "LocalStorage", is there?

        mrjjM 1 Reply Last reply
        0
        • B bundito

          Right, I've studied that. But there's no way to place an existing database into "LocalStorage", is there?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @bundito
          Hi
          Tbh, im not sure, but it seem to work out for this poster
          https://forum.qt.io/topic/66567/import-an-external-sqlite-database-to-my-project

          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