473,411 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

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

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

Apr 25 '07 #1
2 1485
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
Apr 26 '07 #2
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
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
Apr 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Son KwonNam | last post by:
I have some very huge(4~600MB) XML file which is in XML Native database - eXcelon. The problem is that I need to convert all the xml elements' names to lowercase. I think I could do this with...
6
by: Krij | last post by:
Hi! I wonder: is '<SCRIPT TYPE="TEXT/JAVASCRIPT1.2">' a correct way of starting? Or should it be kept in lowercase?
6
by: silversurfer2025 | last post by:
Hello world, I seem to go from one tricky error to the other (at least tricky for me). I am using qt and another code-package where many other files are stored which I need (written by someone...
3
by: Tina I | last post by:
I'm trying to 'convert' my self from Qt3 to Qt4 (it rocks!) and one thing seem strange: With Qt3 I usually did "from qt import *", but this does not seem to work with Qt4. I have to use "from...
25
by: Daniel Jonsson | last post by:
So, I've reached the point where my building pipeline tools actually needs to be used by other people in my company. By this reason I actually need to think about the usability, and I've come to...
14
by: Paulo da Silva | last post by:
Hi! If I have two files .py such as m.py from c import * ... x=c() ... os.any_method ...
2
by: Pradnyesh Sawant | last post by:
Hello, I have a newly installed ubuntu 6.06 system. I am trying to install pyqt4 on it, but without success. The contents of the /etc/apt/sources.list file are:...
2
by: Glen | last post by:
Hello, I've written a script in python and put together a simple QFrame with a QTextBrowser with Designer. I've translated the C++ into python using puic4. The .py file is called outputWin.py. ...
2
by: stef mientki | last post by:
hello, Why does Configparser change names to lowercase ? As Python is case sensitive (which btw I don't like at all ;-) but now when really need the casesensitivity, because it handles about...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.