[PyKDE] PyQt v4 Roadmap

Jim Bublitz jbublitz at nwinternet.com
Thu Feb 17 17:42:22 GMT 2005


On Thursday 17 February 2005 08:30, Phil Thompson wrote:
> > Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
> >> The separate Qt v4 libraries will be wrapped as separate Python modules.
> >> The module names will be the same as the corresponding library (eg.
> >> QtCore, QtGui) and be grouped as a single Python package called PyQt4.
> >> The
> >> suggested programming style for new applications would then be:
> >>
> >> import sys
> >> from PyQt4 import QtGui
> >>
> >> app = QtGui.QApplication(sys.argv)
> >
> > Just one personale note: right now, I usually do:
> >
> > from qt import *
> >
> > because I find it useless to write "qt.QApplication" instead of
> > "QApplication" since the leading uppercase "Q" is already a kind of
> > namespace, which is imposed by qt itself. If (by absurd) the class was
> > named
> > "Application", I would probably use "qt.Application".
> >
> > The same applies for QT4: I don't think I'm being helped by writing
> > "QtGui.QApplication" as I'm not going to write a class with a leading
> > uppercase Q in any case (it'd be confusing). So, as long as I am able to
> > write:
> >
> > from PyQt4.QtGui import *
> >
> > and subsequently use "QApplication", I'll be happy.
>
> Then you'll be happy - until that construct is removed from Python.
>
> To all who have asked a similar question, I said that the example I gave
> was the *suggested* form for *new* applications. Otherwise you can do
> whatever Python allows you to do.

You're referring to the '*' and not the dotted notation, I presume. 

I wouldn't miss that.

Jim




More information about the PyQt mailing list