I am running Ubuntu 10.10, and I installed PyQt 4.7.4 through apt-get.
I build a GUI layout with QtDesigner and compile the .ui file to .py using pyuic4.
Then I subclass the auto-generated class and implement the subclass's constructor. I call setupUi() and then receive the following error and stack trace:
$ python src/gui/main_window.py
Traceback (most recent call last):
File "src/gui/main_window.py", line 2, in <module>
from ui_main_window import Ui_MainWindow
File "/home/dmass/sandbox/test/src/gui/ui_main_window.py", line 694, in <module>
from QtDeclarative.QDeclarativeView import QDeclarativeView
ImportError: No module named QtDeclarative.QDeclarativeView
Additionally, when a colleague compiles the .ui file to .py using pyuic4 from a PyQt 4.8.3 install in Windows, I receive the following error:
$ python src/gui/main_window.py
Traceback (most recent call last):
File "src/gui/main_window.py", line 2, in <module>
from ui_main_window import Ui_MainWindow
File "/home/dmass/sandbox/test/src/gui/ui_main_window.py", line 705, in <module>
from PyQt4 import QtDeclarative
ImportError: cannot import name QtDeclarative
It appears that QtDeclarative wasn't installed (or not where Python expects) when I installed PyQt. But oddly, I couldn't find anyone else with the same problem in my google searching.
Does anyone know what's going on here? Thanks for your help!
Dave