I want to create a processing script that saves the QGIS MapCanvas exactly as it is seen on the screen and then Zip up the tifw and a created PRJ. The existing QgsMapCanvas.saveAsImage()-method does exactly what I want. Saving to PNG works, but I want TIF. The third argument takes a QString which I'm supposed to provide like QString("TIF").
However I can't seem to work out how to create a QString. It seems the present wrappers around Qt has removed this class. Just sending in a string or a unicode string ( eg u"TIF") does not work.
Nor does the solution in this thread work: QGIS Map tools and Map canvas--QString errors
I'm clueless as to how to get around this problem without rewriting the logic in saveAsImage().
UPDATE: I got it to work by passing None as per gcarillo's solution, however I have since moved on by using the code from Martin Dobias in this thread: http://osgeo-org.1560.x6.nabble.com/How-to-use-QPixmap-argument-in-saveAsImage-td4112041.html. This is a better solution (although more complicated) as you can set the output resolution.