设置按钮的图片背景:
const static QString stopSignOff = QString::fromStdString("background-image: url(:/BGDTextSoftware/Sources/stopOff.png)");
ui.stopButton->setStyleSheet(stopSignOff);
设置完后按钮会有自带的边框,有点难看:
可以通过设置flat为true来去除:
ui.stopButton->setFlat(true);
嗯,舒服了