[PyQt] QImage constructor

Phil Thompson phil at riverbankcomputing.com
Wed Oct 1 21:50:16 BST 2008


On Wed, 1 Oct 2008 21:04:55 +0200, "Filip Gruszczyński"
<gruszczy at gmail.com> wrote:
> Hi,
> 
> I am trying to use constructor from the class reference:
> 
> QImage.__init__ (self, QString fileName, str format = None)
> 
> like this:
> 
> self.__image = QImage(file, QImage.Format_RGB32)
> 
> but what I get is:
> 
> TypeError: insufficient number of arguments to QImage()
> 
> Am I doing something wrong? Removing QImage.Format_RGB32 makes it work
> fine. I am using PyQt 4.4.3

QImage.Format_RGB32 isn't a string.

Phil


More information about the PyQt mailing list