QTfrontend/model/ThemeModel.cpp
branchphysfslayer
changeset 7776 e78eff243e25
parent 6952 7f70f37bbf08
child 7955 85b3970b402a
--- a/QTfrontend/model/ThemeModel.cpp	Sun Oct 21 00:33:38 2012 +0400
+++ b/QTfrontend/model/ThemeModel.cpp	Sun Oct 21 00:34:14 2012 +0400
@@ -78,11 +78,15 @@
         dataset.insert(Qt::DisplayRole, theme);
 
         // load and set icon
-        QIcon icon(iconpath);
+
+        QPixmap pix(iconpath); // workaround, as QIcon(iconpath) and even QIcon(QPixmap(iconpath)) don't work
+        QIcon icon(pix);
+
         dataset.insert(Qt::DecorationRole, icon);
 
         // load and set preview icon
-        QIcon preview(datamgr.findFileForRead(QString("Themes/%1/icon@2x.png").arg(theme)));
+        pix.load(datamgr.findFileForRead(QString("Themes/%1/icon@2x.png").arg(theme)));
+        QIcon preview(pix);
         dataset.insert(Qt::UserRole, preview);
 
         m_data.append(dataset);