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 change the name and the emplacement of the SQLite database ?
Forum Updated to NodeBB v4.3 + New Features

How to change the name and the emplacement of the SQLite database ?

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.6k 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
    SlimIT
    wrote on last edited by
    #1

    Hi,

    is there a way to change the name and the emplacement of the SQLite database ?

    As exemple my database name is : 33704e7720b9d2247ed1258cad464a99.sqlite and is placed in this folder under linux : /home/slimittn/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases/.

    Thank you.

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

      When opening the database connection you can give the database the path you want by passing the appropriate path to "QSqlDatabase::setDatabaseName.":http://doc-snapshot.qt-project.org/4.8/qsqldatabase.html#setDatabaseName

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SlimIT
        wrote on last edited by
        #3

        Thanks.

        I need to do that with QML and not C++.

        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