lilly_li
7th July 2009, 15:06
Dear sir,
I have written a program to print Rich text. My problem is that I want to specity my own page margins in the program, instead of use QPageSetupDialog.
But when I use
printer.printEngine()->setProperty( QPrintEngine::PPK_PageRect, QVariant( QRect(left, top, ww, hh ) ) );, where printer is QPrinter, it do nothing. So I check the function in Qt's source codes, it do nothing for QPrintEngine::PPK_PageRect ( deafult switch ).
How can I do that?
Thanks.
I have written a program to print Rich text. My problem is that I want to specity my own page margins in the program, instead of use QPageSetupDialog.
But when I use
printer.printEngine()->setProperty( QPrintEngine::PPK_PageRect, QVariant( QRect(left, top, ww, hh ) ) );, where printer is QPrinter, it do nothing. So I check the function in Qt's source codes, it do nothing for QPrintEngine::PPK_PageRect ( deafult switch ).
How can I do that?
Thanks.