Few Questions from beginner
Qt in Education
5
Posts
3
Posters
2.1k
Views
2
Watching
-
HI and welcome to devnet,
- You can handle database connections using
QSqlDatabaseclass and the wholeQtSqlmodule; - Do you want to make queries on DB or something else?
WHat is your C++ knownledge??
@mcosta
My C++ knowledge is rather good. I know a lot about classess, object-oriented programming.
Btw I dont know what i am gonna need according to database. I have never done any database, just know basics queries. But as I said, I want to use database to put my Schedule in it for every day in week and each day filter just the hours with classes.
Thanks for responding. - You can handle database connections using
-
Since you talked about QML I will assume that you work with embedded devices so SQLite is probably the database for you.
Here is an example of how to connect to a database, hope this helps:QSqlDatabase db = QSqlDatabase::addDatabase("SQLITE"); db.setDatabaseName("path/to/database.db"); db.open(); //This will create the database if it doesent existMake sure to include
#include <QSqlDatabase>Also add
QT += sqlTo your project file