When forming a QT4 project, it will ask you to fill in the compiler variable $(#qt), clicking next will bring up the "Global Variable Editor". Here in the Base fill in the QT directory location, in the include area the whole QT directory location with include suddir and the same for the lib part filling it in with the lib location.
Click close (Bug - it will complain its not a valid path, ignore it. It should be correct as long as QT is in the directory you've set). Then next (change these settings to your liking), then finish.
Once this is done, go into project properties and under build options and check that the Linker and Directories areas have (becareful to check what build settings, Debug/Release or the Project, that you're checking) the:
in the include area (Note that \ can be replaced with / in WinXp and up. I'd replace it with / if in windows to make the project compatible with linux).
in the Libraries Directory area.
in the Linker part. Note here that you may need to add other libraries depending on what classes u use (Assistant docs show the module name under the class names). Important: Windows libraries have 4 appended to them in QT win, in Linux the "4" is NOT present (I dont know if the project wizard is smart enough to spot that).
Finally you can bypass the whole wizard thing by just creating a console app and creating a Global Variable like above and using the string mentioned above in the relevant sections.
If your app compiles and links, but "Cannot find QtCore4.dll" or in Linux "QtCore.so.x not found" when running, then in linux u config the dynamic linker:
Edit your /etc/ld.so.conf file (using admin/su/sudo) and add the Qt lib dir (full path) to it save and then run ldconfig using su again.
In other words (in Debian based linux's):
sudo nano /etc/ld.so.conf
then edit the file and save, then
Windows: I just copy the dlls to the same directory as the app I created (messy but works
). The names of the dlls will be the same as the libraries listed in the Linker part.
Hope that Helps