Все вроде делаю как обычно
QSqlDatabase sdb = QSqlDatabase::addDatabase("QSQLITE");
sdb.setDatabaseName("/home/farex/dev/task_reminders/task.db");
sdb.open();
if(sdb.isOpen()){
_query.prepare("INSERT INTO table_task (name, data, time, text) VALUES (:name, :data, time, text)");
_query.bindValue(":name", name );
_query.bindValue(":data", ui->calendarWidget->selectedDate().toString("dd.MM.yyyy"));
_query.bindValue(":time", ui->timeEdit->time());
_query.bindValue(":text", ui->textEdit->toPlainText());
_query.exec();
qDebug() << _query.lastError();
sdb.close();
}
QSqlQuery::prepare: database not open
QSqlError("", "Driver not loaded", "Driver not loaded")
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
("QSQLITE", "QMYSQL", "QMYSQL3", "QPSQL", "QPSQL7")