How can we delete icon from QPushButton?

СhiliРepper

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?

vahancho

In order to delete an image you can set an empty image instead of existing one. For example:

ui->pushButton_1->setIcon(QIcon());

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can we delete table items from redis?

From Dev

QPushButton: How to align icon and text

From Dev

How can we change ActionBarDrawerToggle icon?

From Dev

How to resize QPushButton according to the size of it's icon?

From Dev

How can we delete a column from sql table by using code first approach in EF 6.0?

From Dev

How can we change android application icon dynamically in Android

From Dev

How can we change android application icon dynamically in Android

From Dev

how can we create a hyperlink icon on watson conversation?

From Dev

Should we delete hbmColor & hbmMask for a shared icon?

From Dev

How can we update a duplicate row and then delete it using vba?

From Dev

how can we style string we have from array join ?

From Dev

How can we fetch a prop from the component that we are using? (React)

From Dev

How can I reference an icon from a plugin?

From Dev

How we can access a div from JavaScript?

From Dev

How can we filter text from array

From Dev

How can we read from journal on MongoDb?

From Dev

How can we remove a ':' characters from a string?

From Dev

How to change QPushButton icon size using stylesheets in Qt app

From Dev

How do I set an Icon for a Qpushbutton in a GUI with placeholders in Qt Designer?

From Dev

QT - How to get QPushButton Active On/Off Icon Name

From Dev

How to change QPushButton icon size using stylesheets in Qt app

From Dev

Set icon on qpushbutton

From Dev

Qt Animate QPushButton Icon

From Dev

Can we in any way drag and drop the extensions icon/symbol to change their positions. How we can control it easily in Ubuntu 20.04 LTS?

From Dev

Can we add application icon in notification area of task bar from windows store app?

From Dev

Delete CD icon from desktop

From Dev

Can we register icon overlay at user level?

From Dev

Ionic ion-checkbox can we change icon with another icon?

From Dev

How Can We Hide One Tab Onclicking Of Another Tab Menu apps icon in Ionic 2?

Related Related

  1. 1

    How can we delete table items from redis?

  2. 2

    QPushButton: How to align icon and text

  3. 3

    How can we change ActionBarDrawerToggle icon?

  4. 4

    How to resize QPushButton according to the size of it's icon?

  5. 5

    How can we delete a column from sql table by using code first approach in EF 6.0?

  6. 6

    How can we change android application icon dynamically in Android

  7. 7

    How can we change android application icon dynamically in Android

  8. 8

    how can we create a hyperlink icon on watson conversation?

  9. 9

    Should we delete hbmColor & hbmMask for a shared icon?

  10. 10

    How can we update a duplicate row and then delete it using vba?

  11. 11

    how can we style string we have from array join ?

  12. 12

    How can we fetch a prop from the component that we are using? (React)

  13. 13

    How can I reference an icon from a plugin?

  14. 14

    How we can access a div from JavaScript?

  15. 15

    How can we filter text from array

  16. 16

    How can we read from journal on MongoDb?

  17. 17

    How can we remove a ':' characters from a string?

  18. 18

    How to change QPushButton icon size using stylesheets in Qt app

  19. 19

    How do I set an Icon for a Qpushbutton in a GUI with placeholders in Qt Designer?

  20. 20

    QT - How to get QPushButton Active On/Off Icon Name

  21. 21

    How to change QPushButton icon size using stylesheets in Qt app

  22. 22

    Set icon on qpushbutton

  23. 23

    Qt Animate QPushButton Icon

  24. 24

    Can we in any way drag and drop the extensions icon/symbol to change their positions. How we can control it easily in Ubuntu 20.04 LTS?

  25. 25

    Can we add application icon in notification area of task bar from windows store app?

  26. 26

    Delete CD icon from desktop

  27. 27

    Can we register icon overlay at user level?

  28. 28

    Ionic ion-checkbox can we change icon with another icon?

  29. 29

    How Can We Hide One Tab Onclicking Of Another Tab Menu apps icon in Ionic 2?

HotTag

Archive