[PyKDE] PyQt v4 Roadmap
Giovanni Bajo
rasky at develer.com
Thu Feb 17 16:11:31 GMT 2005
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.
--
Giovanni Bajo
More information about the PyQt
mailing list