Hello!

I am printing from my application and also use QPrintPreviewDialog.
I start the printing procedure like this:
Qt Code:
  1. QPrintPreviewDialog* preview=new QPrintPreviewDialog(&printer);
  2. connect(preview, SIGNAL(paintRequested(QPrinter*)), this, SLOT(printData()));
  3. preview->exec();
To copy to clipboard, switch view to plain text mode 

But, I would like to update a flag in my database, when I send the data to the printer. My problem is that the same slot is called when I see the preview and when I really print, but I would like to update my flag only when I really print.

How could I achieve this?