I have this problem in QPrintDialog. The exec() function isn't working.

Qt Code:
  1. void EditorWin::doPrint() {
  2. #ifndef QT_NO_PRINTER
  3. QPrinter *printer = new QPrinter(QPrinter::HighResolution);
  4. printer->setFullPage(true);
  5. QPrintDialog *printDialog = new QPrintDialog(printer, this);
  6. printDialog->exec();
  7. if (printDialog->exec() == QDialog::Accepted) {
  8. curTab()->document()->print(printer);
  9. }
  10. #endif
  11. }
To copy to clipboard, switch view to plain text mode 

I know that it gets into the function because to test, I put in a qApp->aboutQt() and it did pop up. It is behaving as "QDialog::Rejected".
I would really appreciate the help if someone could offer it.

QT 4.1.0
Win32