Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: antono on June 06, 2008, 06:34:52 am

Title: QT resource files: upgrade offer
Post by: antono on June 06, 2008, 06:34:52 am
I have tried to add QT resource files to my project and encountered a problem
Codeblocks recognized that .qrc file as a resource file, but it does not link uses it in the final executable.
After a short time i had a custom compiler rule for qrc extension ready:
> rcc $file -o $file_dir\$file_name.cpp
> $compiler $options $includes -c $file_dir\$file_name.cpp -o $object
But i think it is kind of global, i am using the "custom command line to build this file" option. I think it would be good to set some rules initialy to support that files.

Investigating more i encountered a problem with moc. qmake generates rules for .h files that contain Q_OBJECT macro. Emulating qmake`s work seems to be ok. Custom build rule:
> moc $file -o $file_dir\moc_$file_name.cpp
> $compiler $options $includes -c $file_dir\moc_$file_name.cpp -o $object
All this can be implemented via plugin. I've downloaded qtworkbench, but it didn't worked at all.

Great program! Thanks!
Title: Re: QT resource files: upgrade offer
Post by: tigeroar on June 07, 2008, 03:45:23 pm
how to use qtworkbench?