News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

QT4 and CB

Started by ryariv, August 23, 2005, 03:36:05 PM

Previous topic - Next topic

ryariv

Hi,

I want to compile a sample QT4 program , I've used this article
http://forums.next.codeblocks.org/index.php/topic,517.0.html

but could not compile the program , I get 43 errors regarding
`QtValidLicenseForGuiModule' does not name a type

can someone guide me how to compile and debug QT4 application?


lucaciti

Hi ryariv,
I do not know whether you already found a solution. I managed to use in a quite direct and easy way QT4 within Code::Blocks. You can find the instructions and an interesting discussion with yop under  http://forums.next.codeblocks.org/index.php?topic=1470.0
Ciao,
Luca

lucaciti

Hi!
I realized the link I suggested is not available to everyone. Well, I resume the content.
I managed to integrate quite well (at least for my needs) QT4 (or QT4.1.0) with Code::Blocks.
If you follow the attached instructions you can:
- create new QT apps from a template
- invoke the QT Designer to edit forms from within Code::Blocks
- let Code::Blocks automatically create the .pro file
- let Code::Blocks build release and debug targets
- interactively debug your QT app with Code::Blocks
- pass options to qmake
Obviously it is just a workaround. The major issue is you have to enable external makefiles and you are no more able to set compiler/linker options from within C::B.
Anyway if you have some specific needs that are already considered in the syntax of the .pro files you can try to play with the qtoptions.txt file that is appended to the .pro file (e.g. "DEFINES += PIPPO").
I hope more people will start using Trolltech QT4 with Code:Blocks and a critical mass wil be reached soon carrying new ideas and new solutions.
I hope this helps as is or (better) can stimulate further improvements.
Cheers,
Luca


[attachment deleted by admin]

Astragale38

Hi Luca,

i'm a new comer to CB and by the way I was looking for an IDE from which I could use the QT lib and QT designer. I found your contribution and thought that was THE solution. Therefore I download all the necessary files and followed your procedure step by step... and was blocked at step 3 (reconfigure and recompile QT) :(.

First, although the path to mingw32-make is present in the environment variable "PATH", the only way to make it found by configure is to copy it in the QT\4.1.2\bin directory. This done, the generation starts but stops in error " ... impossible to find the file project.cpp...  Building qmake failed, returncode=2."

Looking in the qmake directory I found the original version of qmake, and the project.cpp file. so I added the qmake path to my environment variable ... with exactly the same result.

Do you have any idea on what can happen ?

Thanks for your help

Astragale

Michael

Quote from: Astragale38 on May 03, 2006, 05:47:07 PM
i'm a new comer to CB and by the way I was looking for an IDE from which I could use the QT lib and QT designer.

Hello,

Did you check this:

http://forums.next.codeblocks.org/index.php?topic=2253.0

Best wishes,
Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

Astragale38

I will look at it carefully, thank you for the hint.

Astragale.