Author Topic: QT4 and CB  (Read 7386 times)

ryariv

  • Guest
QT4 and CB
« on: August 23, 2005, 03:36:05 pm »
Hi,

I want to compile a sample QT4 program , I've used this article
http://forums.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

  • Guest
Re: QT4 and CB
« Reply #1 on: January 05, 2006, 04:01:49 pm »
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.codeblocks.org/index.php?topic=1470.0
Ciao,
Luca

lucaciti

  • Guest
Re: QT4 and CB
« Reply #2 on: January 19, 2006, 03:11:06 pm »
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

  • Guest
Re: QT4 and CB
« Reply #3 on: May 03, 2006, 05:47:07 pm »
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

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: QT4 and CB
« Reply #4 on: May 03, 2006, 07:46:41 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.codeblocks.org/index.php?topic=2253.0

Best wishes,
Michael

Astragale38

  • Guest
Re: QT4 and CB
« Reply #5 on: May 05, 2006, 10:07:13 am »
I will look at it carefully, thank you for the hint.

Astragale.