Is it possible a derived class object can emit a signal base class
Unsolved
General and Desktop
-
Hi All
I have a base classclass A { Q_Object: public: signals updateUndoRedoActionDone(bool); }; class B : public A { public : void task: }; void B::task() { connect::(this , updateUndoRedoActionDone,otherObject, udateUndoRedoInPhysicalView); } void B::signal() { emit updateUndoRedoActionDone(false); }
The derived object has not has Q_object
-
Hi All
I have a base classclass A { Q_Object: public: signals updateUndoRedoActionDone(bool); }; class B : public A { public : void task: }; void B::task() { connect::(this , updateUndoRedoActionDone,otherObject, udateUndoRedoInPhysicalView); } void B::signal() { emit updateUndoRedoActionDone(false); }
The derived object has not has Q_object
@Qt-Enthusiast Sure it is possible, but B needs Q_OBJECT.