Category "qtsql"

QSqlDatabase is opened but QSqlQuery does not execute and shows error database not opened

I am working on a project. I am trying to run this query but it fails and gives the error. Here is the code: QSqlQuery* printQry = new QSqlQuery(); if

QSqlQuery::exec: database not open

I'm working on qt, my database was rightly connected with qt but suddenly i have the following problem every time i debug,,,i i become not able to fetch or to a