[PyKDE] Incorrect code generation with PyQt-win-commercial-snapshot-20030 309

Greg Fortune lists at gregfortune.com
Thu Mar 20 09:43:01 GMT 2003


Very similar problem here with x11-commercial versions 20030306 through 
20030315.  Looks like Phil changed the scoping for some reason for creating 
the QPixmaps but didn't change it anywhere else.  I ended up just removing 
the self. that appears in front of image0, image1, etc. in pyuic3 and it 
works fine as far as I can tell.

If anyone else needs to patch it until it gets fixed and you can't find where 
to make the change, let me know...

btw, this is what caused the desire for version numbers in the pyuic 
generated files.  I have been thinking I busted my main box in some weird way 
for the last couple weeks, but turns out it was just pyuic :)

Greg

On Monday 17 March 2003 11:52 am, you wrote:
> When I convert my .ui file with pyuic.exe from snapshot-20030309 the
> following code is produced. As you can see the 'image0' reference in
> setPixmap is incorrect.
>
> The same .ui file is generated properly with PyQt 3.5.
>
>
>
> class RunControlMainGUI(QMainWindow):
>     def __init__(self,parent = None,name = None,fl = 0):
>         QMainWindow.__init__(self,parent,name,fl)
>         self.statusBar()
>
>         self.image0 = QPixmap(image0_data)
>
>
>         self.AppOpenButton = QPushButton(self.Frame1,"AppOpenButton")
>        
> self.AppOpenButton.setSizePolicy(QSizePolicy(0,0,0,0,self.AppOpenButton.siz
>ePolicy().hasHeightForWidth())) self.AppOpenButton.setPixmap(image0)
>         Layout2.addWidget(self.AppOpenButton)
>
> Thanks
> -Selim
>
> Selim Tuvi, Research Engineering Group, SLAC
> GLAST, I&T Online, MS 98
> Tel:650-926-3376 Fax:650-926-4335
>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.gmd.de
> http://mats.gmd.de/mailman/listinfo/pykde




More information about the PyQt mailing list