Darren New wrote:
> Isn't it legal to put a class declaration in the same .cpp file where
> you define its member functions and the main() that's the only routine
> that uses it?
>
> When I did that, I got errors about not being able to find the vtable
> for the class.
>
> Is #include supposed to work just like a textual include? Is this
> something funky with the Qt preprocessing stuff?
>
Perfectly legal.
As far as Qt is concerned... are you running moc by yourself?
You known, qmake uses the HEADERS variable to look for Q_OBJECT classes.
If your private class contains that macro, just try and include the
generated .moc directly.
Something like:
source.cpp:
class my_private_implementation
{
Q_OBJECT
/* neat stuff */
};
#include "source.moc"
--
Jonathan.
Post a reply to this message
|