Hi All,
This is my first post to this community. I am an artist from the Netherlands and I use Qt for some graphical things I need for my work.
At this moment I write a little application that places various QPixmap items in a QGraphicsScene (scene).
When I want to write te result to an image file, I first render the scene to a previous created image (a QImage). The program however crashes at the last line in the code below. Does anyone knows why?

Qt Code:
  1. image = image.scaled( scene->itemsBoundingRect ().width() ,
  2. scene->itemsBoundingRect ().height() );
  3.  
  4. // create a painter
  5. QPainter * painter = new QPainter( &image );
  6. // program crashes after next line
  7. scene->render( painter );
To copy to clipboard, switch view to plain text mode