[PyKDE] QtCore.Qt and QtGui.Qt
Phil Thompson
phil at riverbankcomputing.co.uk
Thu Mar 2 15:15:45 GMT 2006
On Thursday 02 March 2006 2:38 pm, Gerard Vermeulen wrote:
> On Thu, 2 Mar 2006 15:26:50 +0100
>
> Gerard Vermeulen <gerard.vermeulen at grenoble.cnrs.fr> wrote:
> > I have been wondering for some time if it wouldn't be better to merge
> > QtCore and QtGui into one single module. This resolves the problem of
> > the Qt namespace clashes. Eventually there could be a QtCore module for
> > people who really only need QtCore (how many?).
> >
> > I see the value of the module prefixes, but the separation in QtCore,
> > QtGui, QtOpenGL is very verbose and I agree that it does not improve
> > readability.
> >
> > I propose a plain Python module PyQt4.qt reading:
> >
> > from PyQt4.QtGui import *
> > from PyQt4.QtOpenGL import *
> > # etc... PyQt4's configure.py can figure out which other modules to
> > import
> >
> > This module could be used as:
> > import qt
> > or (admittedly dangerous):
> > from qt import *
>
> Oops, I mean
> import PyQt4.qt as qt
> or
> from PyQt4.qt import *
I like it - except I would use "Qt" rather than "qt". In fact I really, really
like it.
Phil
More information about the PyQt
mailing list