Git commit d674391479d5ac7f060ba32162f6b873ea4d2c0d by Tomaz Canabrava. Committed on 30/11/2015 at 23:12. Pushed by tcanabrava into branch 'master'. Do not create a pixmap from a resource to set the icon Set the resource on the QIcon directly. Signed-off-by: Tomaz Canabrava M +1 -2 BigButton.cpp http://commits.kde.org/brprint3d/d674391479d5ac7f060ba32162f6b873ea4d2c0d diff --git a/BigButton.cpp b/BigButton.cpp index 1170319..6ba2a35 100755 --- a/BigButton.cpp +++ b/BigButton.cpp @@ -27,11 +27,10 @@ BigButton::BigButton(QWidget *parent, const QString& na= me,const QString& iconPat QWidget(parent), ui(new Ui::BigButton) { = - QPixmap pix(iconPath); ui->setupUi(this); ui->label->setText(name); ui->pushButton->setCheckable(isCheckable); - ui->pushButton->setIcon(QIcon(pix)); + ui->pushButton->setIcon(QIcon(iconPath)); ui->pushButton->setIconSize(QSize(50,50)); //TODO: Hardcoded value, ch= ange this to something calculated for the current display. connect(ui->pushButton, &QPushButton::clicked, this, &BigButton::click= ed); }