Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: martin on July 07, 2005, 06:28:29 pm

Title: QT template for Code::Blocks
Post by: martin 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%?
Title: Re: QT template for Code::Blocks
Post by: mandrav 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.
Title: QT template for Code::Blocks
Post by: martin 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
Title: QT template for Code::Blocks
Post by: mandrav 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.
Title: QT template for Code::Blocks
Post by: martin on July 07, 2005, 09:00:44 pm
$(QTDIR) or $QTDIR also don't work :(

The username is martin :)
Title: QT template for Code::Blocks
Post by: mandrav 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.
Title: QT template for Code::Blocks
Post by: nereus 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 :)
Title: QT template for Code::Blocks
Post by: mandrav on July 08, 2005, 07:18:42 pm
Interesting...
Sorry for the inconvenience :)

Yiannis.
Title: Re: QT template for Code::Blocks
Post by: ryariv 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?
Title: Re: QT template for Code::Blocks
Post by: zhuxuan 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.
Title: Re: QT template for Code::Blocks
Post by: rudin 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?

Title: Re: QT template for Code::Blocks
Post by: yop 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
Title: Re: QT template for Code::Blocks
Post by: alu 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.... :/
Title: Re: QT template for Code::Blocks
Post by: rickg22 on November 24, 2005, 01:47:20 am
Me not understand QT. Me like wxwidgets. Me sorry.
Title: Re: QT template for Code::Blocks
Post by: yop 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 ;)