Initialize QImage before use it.