[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [brprint3d] /: Do not create a pixmap from a resource to set the icon
From:       Tomaz Canabrava <tomaz.canabrava () intel ! com>
Date:       2015-11-30 23:47:42
Message-ID: E1a3YAY-0000MT-V3 () scm ! kde ! org
[Download RAW message or body]

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 <tomaz.canabrava@intel.com>

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);
 }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic