Qt-interest Archive, July 2007
obtaining information about printable area from QPrinter
Message 1 in thread
Hi:
I'm using QPrinter for printing and I would like to specify the
coordinates for printing relative to the edge of the paper. This is
possible with setting QPrinter to setFullPage(true) mode. Now when
painting on the printer, I would like to be able to check if I'm
painting within the printable area. Does anybody know of a way to find
out what the printable area is relative to the paper? QPrinter does
not seem to provide this information.
I'm working with Qt3.3.5 but it appears to be the same with Qt4.
Thanks,
Martin.
--
[ signature omitted ]
Message 2 in thread
QPrinter::pageRect () gives the QRect defined by the margins
QPrinter::paperRect () gives the whole piece of paper
-------------- Original message ----------------------
From: Martin Irman <imartin@xxxxxxx>
> Hi:
>
> I'm using QPrinter for printing and I would like to specify the
> coordinates for printing relative to the edge of the paper. This is
> possible with setting QPrinter to setFullPage(true) mode. Now when
> painting on the printer, I would like to be able to check if I'm
> painting within the printable area. Does anybody know of a way to find
> out what the printable area is relative to the paper? QPrinter does
> not seem to provide this information.
>
> I'm working with Qt3.3.5 but it appears to be the same with Qt4.
>
> Thanks,
> Martin.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
--
[ signature omitted ]
Message 3 in thread
Thanks! I overlooked those methods. They are not available in Qt 3.3.5
but then I saw that QPrinter::margins() which will give me the
information. Hurrah ...
Martin.
ygor@xxxxxxxxxxx wrote:
> QPrinter::pageRect () gives the QRect defined by the margins
> QPrinter::paperRect () gives the whole piece of paper
>
> -------------- Original message ----------------------
> From: Martin Irman <imartin@xxxxxxx>
>> Hi:
>>
>> I'm using QPrinter for printing and I would like to specify the
>> coordinates for printing relative to the edge of the paper. This is
>> possible with setting QPrinter to setFullPage(true) mode. Now when
>> painting on the printer, I would like to be able to check if I'm
>> painting within the printable area. Does anybody know of a way to find
>> out what the printable area is relative to the paper? QPrinter does
>> not seem to provide this information.
>>
>> I'm working with Qt3.3.5 but it appears to be the same with Qt4.
>>
>> Thanks,
>> Martin.
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>> "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]