置百丈玄冰而崩裂,掷须臾池水而漂摇。

[Qt]自定义信号槽(3)

QT 强强

信号槽其他操作:


关联信号槽:

//信号关联信号
    void(teacher::*teacherSingler2)(void) = &teacher::hungry;
    void(student::*studentSlot2)(void) = &student::eat;
    connect(teh,teacherSingler2,stu,studentSlot2);
    connect(btn,&QPushButton::clicked,teh,teacherSingler2);


断开信号槽:

//断开信号
    disconnect(btn,&QPushButton::clicked,teh,teacherSingler2);


发表评论:

验证码