while I use Qt, I don't use codeblocks.
Using QT is fairly straightforward, but it has a couple of QT specific steps that need to be taken in order to compile a QT based program (namely the UI compiler and the MOC compiler).
In order to use QT with codeblocks IDE - you may need to seek out a QT Plugin for Codeblocks.
I've just downloadd and installed Codeblocks.
It already has support for QT4 projects built in.
I already had mingw compiler (c:\mingw directory), and GDB debugger installed (c:\gdb directory). It autodetected mingw with no problem.
I did File -> New -> project -> qt4 project.
It asked me where QT4 was installed - I told it and it did a default QT4 main.cpp file which compiled and ran without a hitch.
have you got mingw compiler and gdb debugger installed ?
humm
look,
now I opend a QT4 project.
I told him where QT4 installed..
anyway , it automatic creating in the project a main file , and that main file contains some QT code...
when I compile the main.cpp file with the QT code , everything is ok.
but when I add my files with the QT code to the project , it didnt find the location of the QT ...
from the menu go Project->Properties.
On the dialogbox (down toward the right hand side bottom) there is a
button called Project build options. This will bring up another
dialogbox.
On this second dialog there is a set of tabs - Compiler Settings, Linker settings, Search Directories, ....
Select Search Directories. You will see a list of include directories to search.
One called QtGui will probably already be listed.
You will need to add QtCore because a lot of the standard QT header stuff like QString is in the QtCore include directory.