To create a non-blocking Python Qt window, i need:
import pyqt_clarisse
and then:
pyqt_clarisse.exec_(App)
In a pyqt_clarisse.py we call see:
from PyQt4 import QtCore
from PyQt4 import QtGui
So i need to install PyQt4 even if i am going to use PySide only.
( In a studio we use PySide for in-house tools, we have a Python with PySide )
But for now i need to install PyQt just to make custom windows non-blocking.
Later i just replaced some lines in pyqt_clarisse.py to work PyQt or (and) PySide.
And now it works w/o PyQt4 in Python, but just with PySide:
- Code: Select all
# from PyQt4 import QtCore
# from PyQt4 import QtGui
# Move import above modules in try block:
try:
PythonQt = __import__('PySide', globals(), locals(), ['QtCore','QtGui'])
except ImportError:
PythonQt = __import__('PyQt4', globals(), locals(), ['QtCore','QtGui'])
QtCore = PythonQt.QtCore
QtGui = PythonQt.QtGui
May be you can do something with this issue in feature releases, for example try to import PySide first.