1 2 3 4 5 6 7 8
| void (teacher::*hungeryFun)(QString) = &teacher::hungery; void (student::*treatFun)(QString) = &student::treat; connect(tea,hungeryFun,stu,treatFun);
connect(tea, static_cast<void (teacher::*)()>(&teacher::hungery),stu, static_cast<void (student::*)()>(&student::treat));
|