C++ (Qt)class BaseQtShape : public QObject{...private: Q_INVOKABLE void test(bool value) { std::cout << "Test: " << value << std::endl; }}; int main(){ QMetaObject::invokeMethod(&shape, "test", Q_ARG(bool, true));}
Only the class that defines a signal and its subclasses can emit the signal.
C++ (Qt)public: void move(int x, int y);signals: void moved(int x, int y);