March 15, 2012

adnan adnan
Lab Rat
275 posts

[SOLVED] How to add an icon to QIcon from resource file

 

I tried adding an icon to QIcon from resource but didn’t work; plz help

  1. ui->actionOpen->setIcon(QIcon("/icons/open_icon.png"));

1 reply

March 15, 2012

adnan adnan
Lab Rat
275 posts

Syntax error: A colon is missing before the address

  1. ui->actionOpen->setIcon(QIcon(:/icons/open_icon.png));

 
  ‹‹ how to use class QTimer ?      Add widget of another process ››

You must log in to post a reply. Not a member yet? Register here!