Well, I think I've told you not to call the accept slot in the constructor in my last reply...
try calling the purgeCache function in http://doc.qt.io/qt-4.8/qwidget.html#showEvent