As you can moc can work on a source and on a header file. For a beginner it's imo better to just use the header-file approach.
moc on src file creates a <filename>.moc which has to be included in <filename>.cpp
moc on header file creates moc_<filename>.cpp which is automagically added to the sourcefile-list by qmake.
Be aware that cmake & automake use a different naming sheme (and you have to include moc src and moc header - it's not done by the buildsystem there)




Reply With Quote
Bookmarks