PDA

View Full Version : moc related errors



kiransu123
26th March 2007, 05:43
hi i am using QGLWidget() for dispalying images
now i want to use signals and slots
my class defination is in same main class so i created a moc file using :
moc -o filename.moc filename.cpp
and then i included the filename.moc file in the main class file
then i give qmake command and then make but now it is showing some syntax error in filename.moc in classname function
what might be the problem plz help me

wysota
26th March 2007, 08:21
Don't use moc manually. If you add the Q_OBJECT macro in the class header, moc should be run automatically.

high_flyer
26th March 2007, 09:58
and then i included the filename.moc file in the main class file
If you are duing it manually, it would be better to add filename.moc to the compile chain, rather then include in code.

then i give qmake command and then make but now it is showing some syntax error in filename.moc in classname function
If you can show us the error output it would be much better.