@mrjj @jsulm Thanks you for your replies. As it turns out, the crash I mentioned was actually caused by a subtle, yet important bug in our test infrastructure: we have a special fixture that will instantiate and destruct the QApplication instance before respectively after each test case. We initiated the argc and argv parameters with variables local to the constructor. For some reason creating a QIcon causes Qt to access argv, in other words: a crash.
Short story: both your suggestion, but also my original approach work perfectly!