Hi there,

I have a class inherited from QGraphicsScene. I want to implement a print() method to render all graphic content of the corresponding QGraphisView onto a page with some user interaction.
Here is the code snippet:


Qt Code:
  1. void MyGraphicsScene::print( void )
  2. {
  3. QPrinter printer( QPrinter::HighResolution );
  4.  
  5. ...
  6.  
  7. QPageSetupDialog psDlg( &printer );
  8. if ( psDlg.exec() != QDialog::Accepted ) return;
  9.  
  10. ...
  11.  
  12. // go on for QPrintDialog and print using QGraphicsView::render(...)
  13. ...
  14. }
To copy to clipboard, switch view to plain text mode 

This works as expected on Windows (NT) but on MacOS X (10.5.8, Qt 4.7) the page setup dialog shows up and immediately vanishes without interaction.

I tried all varations I could think of by studying QPageSetupDialog, QDialog documentation and related threads here (open(), exec() vs show(), stack vs heap, etc..), no change.

I don't think this is specific to QPageSetupDialog. Any idea?

Thanks for helping me out!