Author Topic: Program Qt application with CB  (Read 4980 times)

Offline liweifuj

  • Single posting newcomer
  • *
  • Posts: 5
Program Qt application with CB
« on: September 26, 2005, 05:23:08 pm »
Hello,

Want to program Qt application using CB, due to be new comer for CB, hope could get some supports from you . My OS is Windows XP SP2, CB version is 1.0, Qt version is 3.3.4 . The questions as follows :

1, How to configure CB so that it can support Qt coding.
2, What compiler should I used .
3, Can I use CB's project to build Qt's application ?

Hope could get your advise. Thanks.

David


sethjackson

  • Guest
Re: Program Qt application with CB
« Reply #1 on: September 26, 2005, 05:44:19 pm »
Hello,

Want to program Qt application using CB, due to be new comer for CB, hope could get some supports from you . My OS is Windows XP SP2, CB version is 1.0, Qt version is 3.3.4 . The questions as follows :

1, How to configure CB so that it can support Qt coding.
2, What compiler should I used .
3, Can I use CB's project to build Qt's application ?

Hope could get your advise. Thanks.

David



For # 1 You should set up the bulid options to include the Qt header file directory and the Qt library directory. Go to                     Project->Build Options and set up anything you need to there. I'm assuming you know how to do this because I don't use Qt.
There probably is a help file that comes with Qt with instructions on how to do this.
For # 2 GCC. :)
For # 3 Yes why do you think there is a Qt template?  :wink:

EDIT:

I don't understand the poll?????
« Last Edit: September 26, 2005, 05:48:11 pm by sethjackson »

Offline jmccay

  • Almost regular
  • **
  • Posts: 202
Re: Program Qt application with CB
« Reply #2 on: September 26, 2005, 11:41:12 pm »
I don't understand the poll either?  Windows or QT?  Windows what?  wxWidgets or QT or MFC or etc. would seem like a more appropriate poll because it would compare apples to apples and not a Operating System to a closed source X-platform toolkit.  Can you change the pole?
joe mccay
OS: WinXP, Win98 SE, & sometimes Linux

a little light reading from the wxWidgets 2.6.2 readme: A detailed 2000-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy.

Offline liweifuj

  • Single posting newcomer
  • *
  • Posts: 5
Re: Program Qt application with CB
« Reply #3 on: September 27, 2005, 04:55:42 am »
Hello,

Want to program Qt application using CB, due to be new comer for CB, hope could get some supports from you . My OS is Windows XP SP2, CB version is 1.0, Qt version is 3.3.4 . The questions as follows :

1, How to configure CB so that it can support Qt coding.
2, What compiler should I used .
3, Can I use CB's project to build Qt's application ?

Hope could get your advise. Thanks.

David



For # 1 You should set up the bulid options to include the Qt header file directory and the Qt library directory. Go to                     Project->Build Options and set up anything you need to there. I'm assuming you know how to do this because I don't use Qt.
There probably is a help file that comes with Qt with instructions on how to do this.
For # 2 GCC. :)
For # 3 Yes why do you think there is a Qt template?  :wink:

EDIT:

I don't understand the poll?????

Yes, CB has included a Qt template . generally , using qmake to generate Qt style file , e.g., .pro, Makefile, etc. but I am not sure how to use CB to generate and maintain Qt's project directly , hope can get a basic operating policy. Thanks.

David

sethjackson

  • Guest
Re: Program Qt application with CB
« Reply #4 on: September 27, 2005, 06:26:01 pm »
C::B generates the makefile for you. So you don't need to mess with it. Otherwise I'm not sure what you are trying to do? It seems to me that the Qt template does what you need??!!. And I still don't get the poll. Are you learning English, or is it your native language?

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Program Qt application with CB
« Reply #5 on: September 28, 2005, 09:19:39 am »
There are problems compiling qt apps with code blocks, if you search the forum you'll find some work arounds to compile qt apps. The main thing is that qt creates some intermediate code out of the code you write using a meta object compiler as Trolltech names it. The design desision in c::b seems to be that you should already provide everything needed for syccesfull compilation, something that doesn't really fit with qt. I am working on a patch that will let you use qmake as a makefile genarator that automates the process of meta source code generation, source code needed for resources, ui files etc. etc. I've allready acheived some basic integration  and now I'm working on the advanced and the custom compiler settings.
Now if you want to compile qt projects and have all the c::b functionality there's only one way to go:
generate the moc source files running moc (Meta Object Compiler) on every source file of your project
run uic (User Interface Compiler) on every .ui file of your project
run rcc (Resource Compiler) on every recource file of your project
add all the generated source files to your c::b project
include the qt headers path
set the options so that you can link against qt libs
build...
I believe that you can automate the above with some preprocessing steps or something but haven't tried it cause now I am compiling qt apps using my patched CVS version of c::b :wink:
« Last Edit: September 28, 2005, 09:22:07 am by yop »
Life would be so much easier if we could just look at the source code.