PDA

View Full Version : qt4 application debug



tsemer
7th November 2007, 09:54
Hello to all !!
The last days I am trying to setup my PC (windows XP sp2) to start programming an application in qt4.
My former experience in qt was with qt2.3 non commercial edition and visual studio 6.

I have downloaded the open source qt4 installer + qt eclipse integration + minGW.. This configuration I am talking about is not stable ...

I also tried HaiQ which is very nice but you can not debug (am I wrong with this one ??)

so the question is can you propose an IDE or other configuration to write + manage + build + debug my application ?

thanks

tsemer

high_flyer
7th November 2007, 11:31
You can try QDevelop and Edyuk too.

Kimmo
7th November 2007, 13:12
You could try Code::Blocks too. It has a template for Qt4 applications, though I think it doesn't integrate with the static build of Qt.

You can set Code::Blocks to use a custom makefile. To make the makefile available you can set pre-build steps for the project and call qmake appropriately to generate a custom makefile.

I honestly haven't tried it, though. I only use it for editing my code, since it has a nice code completion feature. For building purposes I have four batch files, static release, static debug, dynamic release, dynamic debug, which I then call from the command line. I found it easier than all the hassle with adding the pre-build steps and all to the project each time.

For debugging I use GDB from the command line. This setup has worked for me fine for my short time with Qt. The real practicality will be proven on the long run, I guess.

pherthyl
7th November 2007, 18:56
If you want a good debugger, the best choice is using Visual Studio Express 2005. It's a bit more work than with the mingw install, but the resulting exes are faster and smaller, and it works great with visual studio (you need to create makefile projects, and maintain a pro file still, check google for instructions). The current version of Qt no longer requires the compiler patch from qtwin.

tsemer
9th November 2007, 10:05
The current version of Qt no longer requires the compiler patch from qtwin.

Thank you pherthyl. These are very good news for me..:)
I am cleaning up my system in order to make a clean install for this new configuration.

So you say that I don't need the patch from qtwin? because there is a patch named 4.3.X and i guess it is something like generic patch (?).
what do you suggest?

thanks
tsemer

(happily installing QT4)

pherthyl
9th November 2007, 18:58
Thank you pherthyl. These are very good news for me..:)
I am cleaning up my system in order to make a clean install for this new configuration.

So you say that I don't need the patch from qtwin? because there is a patch named 4.3.X and i guess it is something like generic patch (?).
what do you suggest?

thanks
tsemer

(happily installing QT4)
I'm pretty sure you don't need the patch anymore for 4.3.2. In previous versions, the open source Qt did not support the visual studio compiler, so you needed the patch. As far as I know, Trolltech added support for msvc, so the patch should no longer be necessary. I haven't tried this though, so I'm not 100% sure.

More or less, you will have to install the Microsoft platform SDK, then install Visual studio and fix the paths to work with the platform SDK (the VS download site has instructions). Then download the sourcecode zip of open source Qt, open a VS command prompt, and use configure.exe to build qt.

It's a bit of work to set up, but it is worth it in the end!