lowercase class names, eg., qtgui ? (PyQt4)

G

Glen

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
 
T

Tina I

Glen said:
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
 
G

Glen

On Thu, 26 Apr 2007 09:09:44 +0200, Tina I wrote:

Hi Tina,

Thanks for the reply. Of course, by now I've run pyuic4 again on my .ui
file and things are back to normal. Believe it or not, my example was a
copy/paste directly from my .py file. Some strange anomoly, I guess.
Everything's ok now. Maybe vim was just displaying the text wrong for a
minute. Had me going though.

Thanks again.

Glen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top