pythongui 三维_PyQt5嵌入mayavi-python显示三维实体

# First, and before importing any Enthought packages, set the ETS_TOOLKIT

# environment variable to qt4, to tell Traits that we will use Qt.

import os

# os.environ['ETS_TOOLKIT'] = 'qt4'

# By default, the PySide binding will be used. If you want the PyQt bindings

# to be used, you need to set the QT_API environment variable to 'pyqt'

os.environ['QT_API'] = 'pyqt5'

# To be able to use PySide or PyQt4 and not run in conflicts with traits,

# we need to import QtGui and QtCore from pyface.qt

from pyface.qt import QtGui, QtCore

# Alternatively, you can bypass this line, but you need to make sure that

# the following lines are executed before the import of PyQT:

# import sip

# sip.setapi('QString', 2)

from traits.api import HasTraits, Instance, on_trait_change

from traitsui.api import View, Item

from mayavi.

你可能感兴趣的:(pythongui,三维)