On Donnerstag, 22. Mai 2008, Phil Thompson wrote:
> On Thursday 22 May 2008 2:38:02 pm Detlev Offenbach wrote:
> > Hi,
> >
> > I just discovered, that the following line of code fails.
> >
> > printer.setPageSize(settings.value("UIPreviewer/pagesize").toInt()[0])
> >
> > The error given is "TypeError: argument 1 of QPrinter.setPageSize() has
> > an invalid type". How do I convert an integer to a QPrinter.PageSize
> > (e.g. 0 -> QPrinter.A4)?
>
> Pass the integer to the ctor...
>
>     QPrinter.PageSize(0)
>

Thanks. Seems my PyQt programmins skills are getting a bit rusty.

Regards,
Detlev
-- 
Detlev Offenbach
[EMAIL PROTECTED]
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to