mendynew
15th March 2008, 02:50
I used qt 4.2.2 on windows.
QPrinter printer;
printer.setResolution(QPrinter::HighResolution);
QPageSetupDialog psd(&printer);
if(psd.exec() != QDialog::Accepted)
return;
......
QPageSetupDialog will show native page setup dialog.
I can set margins in this dialog, however, it will not tak any effect.
When reopen the dialog, the margin will be the default values.
I tried to manually to set QPrinter's page rectangle via
printer.printEngine->setProperty(QPrintEngine::PPK_PageRect,...).
But it does not work either.
I don't know there's any way to set the margin in page setup dialog.
Thanks!
QPrinter printer;
printer.setResolution(QPrinter::HighResolution);
QPageSetupDialog psd(&printer);
if(psd.exec() != QDialog::Accepted)
return;
......
QPageSetupDialog will show native page setup dialog.
I can set margins in this dialog, however, it will not tak any effect.
When reopen the dialog, the margin will be the default values.
I tried to manually to set QPrinter's page rectangle via
printer.printEngine->setProperty(QPrintEngine::PPK_PageRect,...).
But it does not work either.
I don't know there's any way to set the margin in page setup dialog.
Thanks!