Error when loading QIcon from plugin resource on mac
Hi,
i have several plugins where i call a function to retrieve the plugins icon, for example:
Code:
return QIcon(":/images/picture.png");
}
When i load the plugin in the main application i still get an error:
Code:
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x9020e732 __kill + 10
1 libSystem.B.dylib 0x9020e724 kill$UNIX2003 + 32
2 libSystem.B.dylib 0x902a198d raise + 26
3 libSystem.B.dylib 0x902b7a44 abort + 93
4 QtCore 0x021c79d5 qt_message_output(QtMsgType, char const*) + 149
5 QtCore 0x021c7b9a qt_message(QtMsgType, char const*, char*) + 186
6 QtCore 0x021c7cd9 qFatal(char const*, ...) + 25
7 QtGui 0x0173bc8e qt_pixmap_thread_test() + 94
12 MyPlugin.dylib 0x1475bd00 Plugins::MyProject::Formulas::MyPlugin::icon() const + 64
The funny thing is that it works fine under Linux and Windows.
Could anybody say me what on Mac is going wrong?
Thanks in advance
Best Regards
NoRulez
Re: Error when loading QIcon from plugin resource on mac
Which version of Qt are you using?
It could just be a bug in Qt. I ran into one related to loading .ico files in Qt Creator, which was introduced with 4.6 release.
Try a different image format if you can and report it on the qt bug tracker if you can reproduce it in a small test project.