enter image description here
enter image description here om / GHFcx.png
尝试此连接:
connect(ui->pushButton1, &QPushButton::clicked, &myprojekt::plus); connect(ui->pushButton2, &QPushButton::clicked, &myprojekt::minus);
并将函数plus()end minus()放在myprojekt内。您必须创建另一个按钮,不能将这两个功能连接到同一按钮。