Thanks Ginsengelf,

You were right the method was rending the file twice in the loop, which also was taking a lot of time to load into a QIcon.

As per suggestion, I created a cache of icons that were rendered in a seperate thread in order to not be blocking, hash map was defined via:

Qt Code:
  1. QMap<QString, QIcon>* iconCache;
To copy to clipboard, switch view to plain text mode