After begining the program I set icons on all pushbuttons. Code is like this:
QImage img;
img.load(pictureName);
ui->pushButton_1->setIcon(QPixmap::fromImage(img));
ui->pushButton_1->setIconSize(img.size());
But after some actions I need delete pictures and set some text. How can I do it?
In order to delete an image you can set an empty image instead of existing one. For example:
ui->pushButton_1->setIcon(QIcon());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With