1 2 3 4 5 6 7 | //mainwindow.h public slots: void ValueChange(int value); //mainwindow.cpp auto spinbox = new QSpinBox; connect(spinbox, &QSpinBox::valueChange, this, &mainwindow::ValueChange); |
1 | connect(spinbox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChange), this, &mainwindow::ValueChange); |
1 | connect(spinbox, qOverload<int>(&QSpinBox::valueChange), this, &mainwindow::ValueChange); |
欢迎光临 firemail (http://firemail.wang:8088/) | Powered by Discuz! X3 |