I am new to Qt and C++ (coming from the PHP world) and am stuck on something that is probably pretty obvious: including non-core Qt modules.
I (understandably) get the compile error that QSqlDatabase does not name a type.
I also get errors when I include either of the following:
#include <QSqlDatabase>#include <QSql>
Any idea how to include the QSql module? Thanks in advance.
Add
To your .pro file to enable this module.
Be careful that you don’t do
after the
Or simply put all the modules in one line: