I have my class X
which inherits from Qt's class Base
. I declared and defined void mySlot()
slot in my class X
and I'm connecting some signal to this slot in X's constructor. However, when running my program I get an error message saying there's no such slot as void mySlot()
in the class Base
.
Why is the code generated by Meta Object Compiler (moc) looking for my slot in the base class and not in my (derived) class?
Did you add the Q_OBJECT macro on the derived class?
From #qt irc channel
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With