Если Qwt не использовать то все прекрасно.
Нашел такие статью:
http://code.google.com/p/phduino/source/browse/wiki/pYpHpoTManual.wikihttp://www.riverbankcomputing.com/pipermail/pyqt/2006-August/013960.htmlНа сколько я понял там рекомендуют просто заменить в сгенерированном pyuic4 файле
from qwt_plot import QwtPlot
на
from PyQt4.Qwt5 import QwtPlot
Да, это помогает. Но появляются проблемы если подключать *.ui формы динамически:
Под линем:
Traceback (most recent call last):
File "/home/tax/tmp/python/wiki_ex_utf_2/test.pyw", line 19, in <module>
sys.exit(main())
File "/home/tax/tmp/python/wiki_ex_utf_2/test.pyw", line 12, in main
form = mainform.TMainForm() # ñîçäàᄌò îáúåêò ôîðìû
File "/home/tax/tmp/python/wiki_ex_utf_2/mainform.py", line 13, in __init__
uic.loadUi("mainform.ui", self)
File "/usr/lib/pymodules/python2.6/PyQt4/uic/__init__.py", line 177, in loadUi
return DynamicUILoader().loadUi(uifile, baseinstance)
File "/usr/lib/pymodules/python2.6/PyQt4/uic/Loader/loader.py", line 21, in loadUi
return self.parse(filename)
File "/usr/lib/pymodules/python2.6/PyQt4/uic/uiparser.py", line 813, in parse
actor(elem)
File "/usr/lib/pymodules/python2.6/PyQt4/uic/uiparser.py", line 661, in createUserInterface
self.traverseWidgetTree(elem)
File "/usr/lib/pymodules/python2.6/PyQt4/uic/uiparser.py", line 639, in traverseWidgetTree
handler(self, child)
File "/usr/lib/pymodules/python2.6/PyQt4/uic/uiparser.py", line 163, in createWidget
self.stack.push(self.setupObject(widgetClass(elem), parent, elem))
File "/usr/lib/pymodules/python2.6/PyQt4/uic/uiparser.py", line 135, in setupObject
obj = self.factory.createQObject(clsname, name, args, is_attribute)
File "/usr/lib/pymodules/python2.6/PyQt4/uic/objcreator.py", line 65, in createQObject
classType = self.findQObjectType(classname)
File "/usr/lib/pymodules/python2.6/PyQt4/uic/objcreator.py", line 75, in findQObjectType
w = module.search(classname)
File "/usr/lib/pymodules/python2.6/PyQt4/uic/Loader/qobjectcreator.py", line 52, in search
self._modules[module] = __import__(module, {}, {}, (cls,))
ImportError: No module named qwt_plot
Под офтопиком:
Traceback (most recent call last):
File "C:\home\Python\wiki_ex_utf_2\test.pyw", line 19, in <module>
sys.exit(main())
File "C:\home\Python\wiki_ex_utf_2\test.pyw", line 12, in main
form = mainform.TMainForm() # создаёт объект формы
File "C:\home\Python\wiki_ex_utf_2\mainform.py", line 13, in __init__
uic.loadUi("mainform.ui", self)
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\__init__.py", line 112, in loadUi
return DynamicUILoader().loadUi(uifile, baseinstance)
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\Loader\loader.py", line 21, in loadUi
return self.parse(filename)
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\uiparser.py", line 768, in parse
actor(elem)
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\uiparser.py", line 616, in createUserInterface
self.traverseWidgetTree(elem)
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\uiparser.py", line 594, in traverseWidgetTree
handler(self, child)
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\uiparser.py", line 162, in createWidget
self.stack.push(self.setupObject(widgetClass(elem), parent, elem))
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\uiparser.py", line 134, in setupObject
obj = self.factory.createQObject(clsname, name, args, is_attribute)
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\objcreator.py", line 57, in createQObject
classType = self.findQObjectType(classname)
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\objcreator.py", line 67, in findQObjectType
w = module.search(classname)
File "C:\soft\Python26\lib\site-packages\PyQt4\uic\Loader\qobjectcreator.py", line 24, in search
self._module = __import__(self._moduleName, {}, {}, self._classes)
TypeError: 'set' object does not support indexing
Пробовал в *.ui фале заменить
<header>qwt_plot.h</header>
на
<header>PyQt4.Qwt5.h</header>
но это помогает только под линем и до первого изменения формы.