[PyKDE] Support for Qt v1.x and Qt v2.x

Pete Ware ware at cis.ohio-state.edu
Fri Feb 25 21:19:25 GMT 2000


Two choices:

1. Have the application do an "import qt2" (in only a single file).
   qt2 could then modify the toplevel namespace so that "qt" and "qt2"
   are equivalant (I don't know how to do this).  (Same thing for kde)

2. Modify qt 1 so when it is initially loaded (__init__.py) if either
   some Python variable is true or some environment variable is set
   then use qt2.0 (same thing for kde)

Pmw actually supports simultaneous versions by putting them all under
a common directory.  The following is the file Pmw/__init__.py:

# This file is executed when the Pmw package is imported.  It creates
# a lazy importer/dynamic loader for Pmw and replaces the Pmw module
# with it.  Even though the loader from the most recent installed
# version of Pmw is used, the user is able to specify which version of
# Pmw megawidgets to load by using the setversion() function of the
# loader.

# This is the only file in Pmw which is not part of a particular Pmw
# release.

--pete




More information about the PyQt mailing list