szisziszilvi
8th March 2011, 12:13
Hi,
I would like to try some simple database-connection. I opened the cachedtable example in the Creator which works fine. Then I started a brand new project, chose "Qt Gui application" and here is where I got lost... Ok, this is not my first Qt project, but this time there are things I can't get.
So. In the example there is
#include <QApplication>
In my one it is:
#include <QtGui/QApplication>
by default. First: what is the difference?
The second might be a related question.
There is the "connection.h" in that example, which I simply copied into my project. (Add new -> c++ source file -> and then simply copy-pasted the example header code, it's just the error message box that I throw out.) I included this file with #include "connection.h" in the mainwindow.h, and tried to build this project, but this did not work. It complains for all the included libraries in the heades saying "No such file or directory.".
I tryed to change the include lines like #include <QtSql/...> but it does not work at all.
So what do I not understand? I'm a bit confused... :S
I would like to try some simple database-connection. I opened the cachedtable example in the Creator which works fine. Then I started a brand new project, chose "Qt Gui application" and here is where I got lost... Ok, this is not my first Qt project, but this time there are things I can't get.
So. In the example there is
#include <QApplication>
In my one it is:
#include <QtGui/QApplication>
by default. First: what is the difference?
The second might be a related question.
There is the "connection.h" in that example, which I simply copied into my project. (Add new -> c++ source file -> and then simply copy-pasted the example header code, it's just the error message box that I throw out.) I included this file with #include "connection.h" in the mainwindow.h, and tried to build this project, but this did not work. It complains for all the included libraries in the heades saying "No such file or directory.".
I tryed to change the include lines like #include <QtSql/...> but it does not work at all.
So what do I not understand? I'm a bit confused... :S