[Qt-interest] Trouble with QPrintPreviewWidget

Marcelo Estanislau Geyer estanisgeyer at hotmail.com
Tue Dec 9 21:35:12 CET 2008


David,

I understand perfectly that there may be differences between the
systems. Passing QPrinter: HighResolution in constructor
QPrinter got a satisfactory result. 
 These results:
pageRect: QRect(0,0 9917x14033)
logicalDpiX and logicalDpiY: 1200

The values is refer in the same notebooks (kubuntu in 1440x900 and Fedora in 1024x768).
The paperSize is A4.  

As the report is that I am generating complex, I have some special care? I could have surprises in future?
I thought of designing the rectangle with fixed values based on the resolution currently supported (Logical DPI)

Thanks,

Marcelo.


> Marcelo,
> 
> > Yes, its preview a rectangle in top page. Its very simple example.
> > See the images. In Fedora, notebook 14", in Kubuntu, notebook widescreen,
> > but there should be differences in preview or the time of printing, what is
> > happening.
> 
> It could be that the resolution of the printer device is different. Specifying
> absolute coordinates like
> 
>         QRect rect(QPoint(30, 30), QSize(750, 30));
> 
> will give different results on different devices. This will be reflected in
> the values you obtain from QPrinter's pageWidth() and pageHeight() functions:
> 
>   http://doc.trolltech.com/4.4/printing.html#coordinate-systems
> 
> You could also write out the device's resolution. This is given in dots per
> inch (DPI):
> 
>   qDebug() << printer->logicalDpiX() << printer->logicalDpiY();
> 
> I would expect these to differ between your two systems.
> Regards,
> 
> David
> -- 
> David Boddie
> Senior Technical Writer
> Nokia, Qt Software

_________________________________________________________________
Receba GRÁTIS as mensagens do Messenger no seu celular quando você estiver offline. Conheça  o MSN Mobile!
http://mobile.live.com/signup/signup2.aspx?lc=pt-br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081209/e9307ba9/attachment.html 


More information about the Qt-interest-old mailing list