June 12, 2011

Leon Leon
Robot Herder
400 posts

How to set QIcon::fromTheme() to a label?

 

So label uses <QPixmap> so i am not able to set it like this:

  1. ui->label->setPixmap(QIcon::fromTheme("folder"));

What can i do?

1 reply

June 12, 2011

mlong mlong
Mad Scientist
1517 posts

Have you tried QIcon::pixmap() [doc.qt.nokia.com] yet?

 Signature 

Senior Software Engineer
AccuWeather Enterprise Solutions
/* My views and opinions do not necessarily reflect those of my employer.  Void where prohibited. */

 
  ‹‹ [Solved] QVariant and enums      [Solved] How to hide and show a mainwindow? ››

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