I use Eric 4.3.4
How to make it possible to start with QT Designer, designate the path search
directory containing the plugins and Python where it can find the widgets.
Example:
# Set a specified environment variable with a directory name.
def setEnvironment(env, var_name, dir_name):
# Convert the relative directory name to an absolute one.
dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), dir_name)
# Remove any existing value so that we have a controlled environment.
idx = env.indexOf(QtCore.QRegExp("^%s=.*" % var_name,
QtCore.Qt.CaseInsensitive))
if idx >= 0:
env.removeAt(idx)
env << "%s=%s" % (var_name, dir)
# Tell Qt Designer where it can find the directory containing the plugins
and
# Python where it can find the widgets.
env = QtCore.QProcess.systemEnvironment()
setEnvironment(env, "PYQTDESIGNERPATH", "python")
setEnvironment(env, "PYTHONPATH", "widgets")
# Start Designer.
designer = QtCore.QProcess()
designer.setEnvironment(env)
....
_______________________________________________
Eric mailing list
[email protected]
http://www.riverbankcomputing.com/mailman/listinfo/eric