Add this code to increase the threadpool so that the GIS can be rendered.
In this situation the Qgis libraries was used in a Qt application and there was no more threads available for rendering.