View Full Version : Printing question

27th June 2011, 14:52

I am printing from my application and also use QPrintPreviewDialog.
I start the printing procedure like this:

QPrintPreviewDialog* preview=new QPrintPreviewDialog(&printer);
connect(preview, SIGNAL(paintRequested(QPrinter*)), this, SLOT(printData()));

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?