Author Topic: QT template for Code::Blocks  (Read 38022 times)

martin

  • Guest
QT template for Code::Blocks
« on: July 07, 2005, 06:28:29 pm »
Hi there!

Some days ago I have searched for a new IDE and found Code::Blocks. And this tool rocks. I tried to work with Dev-C++ but this tool is so unstable that I kicked away.

Due to I have not found nothing for QT, I have created a template for QT which can be used with C::B. The template file can be found at http://mmartin.mm.funpic.de/index.php?lang=en&link=downloads.

I have tested this template on two workstations and the hello world example works. If not just tell it me.

Cya
Martin

P.S. Is it possible to use in the xml based template file environmental variables, like %WINNT% or %QTDIR%?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: QT template for Code::Blocks
« Reply #1 on: July 07, 2005, 06:43:32 pm »
Quote from: martin
P.S. Is it possible to use in the xml based template file environmental variables, like %WINNT% or %QTDIR%?

AFAIK, yes it's possible.
It would be better if you could submit this QT template to the patch tracker (follow the link on the nav. tree).

Thanks and welcome :)

Yiannis.
Be patient!
This bug will be fixed soon...

martin

  • Guest
QT template for Code::Blocks
« Reply #2 on: July 07, 2005, 07:08:36 pm »
Ok, I have added it to the patch tracker.

Back to the env vars. I tried to use %QTDIR%, but it seems that it does'nt work (the variable exists in my system). Maybe I am doing something wrong?

BTW, I have registered me for this forum, but I did not get an verification mail with my password. Could you maybe take a look at that?

Thanks,

Martin

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
QT template for Code::Blocks
« Reply #3 on: July 07, 2005, 08:31:07 pm »
Quote from: martin
Ok, I have added it to the patch tracker.

Thanks :)

Quote from: martin
Back to the env vars. I tried to use %QTDIR%, but it seems that it does'nt work (the variable exists in my system). Maybe I am doing something wrong?

Have you tried using $(QTDIR) ?

Quote from: martin
BTW, I have registered me for this forum, but I did not get an verification mail with my password. Could you maybe take a look at that?

Yes, if you could tell me the username you registered ;)

Yiannis.
Be patient!
This bug will be fixed soon...

martin

  • Guest
QT template for Code::Blocks
« Reply #4 on: July 07, 2005, 09:00:44 pm »
$(QTDIR) or $QTDIR also don't work :(

The username is martin :)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
QT template for Code::Blocks
« Reply #5 on: July 07, 2005, 09:05:21 pm »
Quote from: martin
$(QTDIR) or $QTDIR also don't work :(

OK, I 'll take a look at it.

Quote from: martin
The username is martin :)

I can't find such a user in the database. Probably something's gone wrong...
Try to register again and if you still have problems, post them here.

Yiannis.
Be patient!
This bug will be fixed soon...

nereus

  • Guest
QT template for Code::Blocks
« Reply #6 on: July 08, 2005, 04:00:08 pm »
Ok, I have registered today for another time, but I still didn't received an email. Now I have typed in another email address from a different provider and it works :) Maybe the server don't trust or like india.com :)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
QT template for Code::Blocks
« Reply #7 on: July 08, 2005, 07:18:42 pm »
Interesting...
Sorry for the inconvenience :)

Yiannis.
Be patient!
This bug will be fixed soon...

ryariv

  • Guest
Re: QT template for Code::Blocks
« Reply #8 on: August 23, 2005, 03:37:53 pm »
Hi,

I've used this template


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?

zhuxuan

  • Guest
Re: QT template for Code::Blocks
« Reply #9 on: August 26, 2005, 07:34:13 pm »
Try the following solutions:

1. Set QTDIR variable to OS's current user's environment variable, just like qtvars.bat do. ( This batch file is in the qt-win-opensource-4.0.1-mingw.exe).

Or

2. In Code::Blocks, Project -> Build options -> Custom variables, add QTDIR = somewhere.

these solutions can make qt applications compile well without using the patch template.

Hope this is helpful.

rudin

  • Guest
Re: QT template for Code::Blocks
« Reply #10 on: September 20, 2005, 01:35:10 am »
ryariv:
I experienced the same problem as yours (regarding QtValidLicenseForGuiModule error) on Windows platform. I found a solution somewhere on the net:
- modify file src/corelib/global/qconfig.h
- try something like this:
  #define QT_PRODUCT_LICENSEE "your name"
  #define QT_PRODUCT_LICENSE "OpenSourceDesktop"

Hope this help.

Next problem when using Qt library, is that every class definition using signals and slots have to be 'precompiled' with 'moc' command. Until now, I never succeeded compiling such classes. Anybody found solution for this problem without creating a special 'Qt plugin' as alu (one of this forum member) plan to do?


Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QT template for Code::Blocks
« Reply #11 on: September 20, 2005, 08:27:54 am »
See for solution on the QtValidLicenseForGuiModule issue in qt's mailing list: http://lists.trolltech.com/qt-interest/2005-08/msg00936.html
I am currently working on making c::b use qmake as a makefile generator (most likely it will be finished by the end of the week). As a work around you can follow the steps from this thread: http://forums.codeblocks.org/index.php/topic,615.0.html. Hope I hepled
Life would be so much easier if we could just look at the source code.

alu

  • Guest
Re: QT template for Code::Blocks
« Reply #12 on: November 24, 2005, 01:12:34 am »

Next problem when using Qt library, is that every class definition using signals and slots have to be 'precompiled' with 'moc' command. Until now, I never succeeded compiling such classes. Anybody found solution for this problem without creating a special 'Qt plugin' as alu (one of this forum member) plan to do?


Well, I *planned* to do a plugin as I think that's the best way to handle this.  I could see a plugin with some cool features: using qmake, using custom project tags instead of qmake, importing/exporting .pro files...

But I did not really get any response from this thread http://forums.codeblocks.org/index.php/topic,612.0.html, maybe it's my fault for posting in the wrong forum.... :/

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: QT template for Code::Blocks
« Reply #13 on: November 24, 2005, 01:47:20 am »
Me not understand QT. Me like wxwidgets. Me sorry.

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QT template for Code::Blocks
« Reply #14 on: November 24, 2005, 09:25:07 am »
Wow, sorry I missed that thread... I've started writing a plugin some time ago, but I have limited time so it's still in the designs :) I have pached the compiler plugin to generate pro files also (just to get my work done not as proposal for official c::b build). Anyway I'll answer to the correct thread though ;)
Life would be so much easier if we could just look at the source code.