Important: Please read the Qt Code of Conduct -

QSQLITE connecting to an opened database

  • hello,

    i have a Database class that creates and opens a database.
    how can i acces that database from an other class?
    i tried QSqlDatabase db.setHostName(path_to_database/mydb.db) and QSqlDatabase db.setDatabaseName(path_to_database/mydb.db) with no success.

    please help

  • What errors do you see when you try to open sqlite from another QSqlDatabase ?

Log in to reply