Qt 6.11 is out! See what's new in the release
blog
Problem when connection to my SQL database to my exam project
-
Hi, so I have a problem to connect my db to my project.
In connection.h I have this:
#ifndef CONNECTION_H
#define CONNECTION_H
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include <QtSql>
#include <QFileInfo>class Connection
{
public:
Connection();
bool createconnect();
void connclose();
void connopen();
};#endif // CONNECTION_H
How can I connect the connection.h to my database, which name is "mydb"?
I am kinda new and a bit lost in all this things and infos.
Thank you! -
What did you do/tried so far? Did you follow the documentation?