lowercase class names, eg., qtgui ? (PyQt4)
Tina I
tinaweb at bestemselv.com
Thu Apr 26 03:09:44 EDT 2007
Glen wrote:
> Hello,
>
> In the file generated by pyuic4 from Designer's .ui file I noticed the use
> of lower case class names (I'm assuming these are the names of classes,
> not modules). For example:
>
> It imports thusly:
>
> from PyQt4 import QtGui
>
> then uses things like:
> self.gridlayout = qtgui.qgridlayout(dldialog)
>
> What exactly is going on here? Are these instances that are defined
> somewhere else (their not in the local scope.)? Can I do the same in my
> code when I import something?
>
> Thanks,
>
> Glen
>
> Glen
>
Hi,
Are you sure? That's strange. I have never seen that. Here is a snippet
of one of my typical .py files generated by 'pyuic4':
self.gridlayout = QtGui.QGridLayout(self.centralwidget)
self.gridlayout.setMargin(9)
self.gridlayout.setSpacing(6)
self.gridlayout.setObjectName("gridlayout")
self.hboxlayout = QtGui.QHBoxLayout()
self.hboxlayout.setMargin(0)
self.hboxlayout.setSpacing(6)
self.hboxlayout.setObjectName("hboxlayout")
self.hboxlayout1 = QtGui.QHBoxLayout()
self.hboxlayout1.setMargin(0)
self.hboxlayout1.setSpacing(6)
self.hboxlayout1.setObjectName("hboxlayout1")
Upper case all the way...
Tina
More information about the Python-list
mailing list