Yes, but I don't like it. It's kind of "OOP-hack" for me, because architecturally it is inventing another class and making another object when you just want to make base class realise an interface.You can use composition instead of inheritance (so the mainWindow or dialog instance "contains" a notifier object).
It is an encapsulation of composition. Looks like I will use this, though it's not OOP-pure. Yes, macros are not pure tooIf you want to stick to inheritance, then the "Notifier" class does not have to be QObject-based
Using interfaces?There exists quite a lot of object-oriented programming languages without the macro expansion feature. Just imagine how would you solve this problem in one of these languages.
Going to composition-inheritance combination, thank you.
Bookmarks