Hi, all:
Is it possible to overwrite Qt slot?
For instance:
CFather:
Code:
{ Q_OBJECT ..... protected slots: void about(); } void CFather::about() { "Father", "......"); }
CSon:
Code:
class CSon : public CFather { Q_OBJECT ..... protected slots: void about(); } void CSon::about() { "Son", "......"); }
I just want to realize:
A CFather object will call CFather::about() when the menu item "about" is invoked.
A CSon object will call CSon::about() when the menu item "about" is invoked.
(Note: CFather and CSon are almost the same QMainWindow with only a little bit modification.
But, I just want the about() will invoke two different dialogs, with clear indication that this is a "Son" or a "Father" window)
I tried "virtual" already, but whenever I clicked "OK" on the poped CSon:about() QMessageBox, it will CSon QMessageBox once again. That is to say, I've got to click "OK" twice to close QMessageBox thoroughly.
How to deal with this problem?
Best Regards
JIA