[PyKDE] QtCore.Qt and QtGui.Qt

Gerard Vermeulen gerard.vermeulen at grenoble.cnrs.fr
Thu Mar 2 14:38:20 GMT 2006


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 *

Gerard




More information about the PyQt mailing list