Automatic moc generation

Alex Exojo suy21 at
Fri Aug 22 16:27:41 BST 2003

El Viernes, 22 de Agosto de 2003 16:42, Mickael Faivre-Macon escribió:
> Yes, I generated it with KDevelop using the wizard and using "Generate a
> QWidject child class" but I switched from Mandrake to Red Hat making a
> source backup only (stupid of me), then I have created a new project and
> loaded the classes in the project. It worked from the Qt .ui files (the
> moc are generated) but KDevelop does not generate the moc files
> automatically for the other classes like before.

I suggest you to use the "Import existing project" feature of kdevelop 3 (also 
known as gideon). Actually, gideon is still an alpha, but is really very 
usable, and has a great automake management.

> Alexandro:
> > (in reality, kdevelop generates a
> >, which automake uses to create a Makefile).
> Do you know what to change in this .am file in order that the makefile
> call the moc compiler automatically so I don't have to call it my hand
> every time I want to compile my project ? I just want this process to be
> automatic to save time.

"Makefile" is created when you run "configure" using as a basis "". 
"" is created by automake using "", and finally, 
"" is created/modified by hand, or using kdevelop.

In kdevelop 2, ther was a "kdevelop will overwrite this" section, but, as far 
as I know, kdevelop 3 is so smart to manage human modifications to, without causing problems.

Anyway, to handle moc files, you only need to have a line like this in :

I hope that helps, and sorry for my poor english :-P.

Best regards.

Alex (a.k.a. suy) - GPG ID 0xAA8D2A01 - Jabber ID: suy at
BOFH excuse #351:

PEBKAC (Problem Exists Between Keyboard And Chair)

to unsubscribe from this list send an email to kdevelop-request at with the following body:
unsubscribe »your-email-address«

More information about the KDevelop mailing list