After solving the big problem with getting QT Mobility compiled and running (http://qt-project.org/forums/viewthread/29008/) I am facing a new problem:
I am using Eclipse with PyDev and QT 4.7.4 with QT Mobility 1.2.
My App which I want to get run has the following structure:
TwitterCrawler.py
with the following main code:
if __name__ == "__main__":
frontend = os.path.join(os.path.realpath(os.path.dirname(__file__)), "frontend")
app = QApplication(sys.argv)
qmlRegisterType(Controller, "TwitterCrawler", 1, 0, "Controller")
view = QDeclarativeView()
view.setResizeMode(QDeclarativeView.SizeRootObjectToView)
root = view.rootContext()
view.setSource(os.path.join(frontend, "frontend.qml"))
view.show()
app.exec_()
sys.exit()
frontend/frontend.qml
frontend/PageStack.js
frontend/PageStack.qml
frontend.qml contains the following code:
import QtQuick 1.1
import TwitterCrawler 1.0
import QtMobility.location 1.2
import "tweets.js" as Tweets
PageStack{ // line 26
id: rootPage
width: 900
...
This ends up with:
D:\Daten\Eclipse\TwitterCrawler\frontend\frontend.qml:26:1: PageStack is not a type
The frontend folder also contains a frontend.qmlproject with the following code:
import QmlProject 1.1
Project {
mainFile: "frontend.qml"
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
directory: "."
}
JavaScriptFiles {
directory: "."
}
ImageFiles {
directory: "."
}
/* List of plugin directories passed to QML runtime */
// importPaths: [ "../exampleplugin" ]
}
As this is a program which was not created by me and already worked at the developer who gave it to me, I am now not sure what I might have done wrong or what the developer did in another way…
↧