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. [Split] Sqlite database deploying
Forum Updated to NodeBB v4.3 + New Features

[Split] Sqlite database deploying

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.1k 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.
  • K Offline
    K Offline
    kgutteridge
    wrote on last edited by
    #1

    Hi

    Thanks for the advice in this post, I have bound a sqlLite database using c++ to my qml app

    One question I have that remains how could I include a pre populated database file with the application package, so that it could be referenced something like

    db.setDatabaseName(QCoreApplication::applicationDirPath()+"/qml/firstdatabase.db");

    I assume I am being a n00b and this is fairly trivial packaging!

    Thanks in advance

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      I've moved this to another thread from "this one":http://developer.qt.nokia.com/forums/viewthread/4583/
      Don't use old threads for new not really related questions, please.

      About your question. If you need read-only database, then you can add it to qrc (not good solution, really).
      Also you can simply copy it with your executable and other files (as I udnerstood you also have qmls there).
      The best way that I see is to populate it on first start. It is not hard. All you need is to check if there is file at needed plave and if not, create it and populate with sql queries.

      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