Doesnt work either.
I activated the console and now I got some more information about the problem. This is what I get when I am trying to save the image.
QPainter::begin: Paint device returned engine
== 0, type
: 3;
QPainter::setClipRect: Painter not active
QPainter::restore: Unbelanced save
/restore
.
.
.
.
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3;
QPainter::save: Painter not active
QPainter::setClipRect: Painter not active
QPainter::restore: Unbelanced save/restore
.
.
.
.
QPainter::end: Painter not active, aborted
To copy to clipboard, switch view to plain text mode
SOLVED
rect.size().toSize() was the problem. The size was not valid and therefore the image was invalid. So many hours 
Thanks for your help
Bookmarks