[Solved] QdeclarativeImageprovider issues
Hello,
i have been trying to use qdeclarative plugin for a while now.I have been following this [doc.trolltech.org].
I am trying to use it in my mainwindow.cpp class but i always get a runtime warning saying
QML Image: Failed to get image from provider: image://colors/red
QML Image: Failed to get image from provider: image://colors/yellow
Any suggestions ?
4 replies
Hi there!
Hm… besides the obvious (‘there is something wrong in you provider’), I can point you one of the Qt examples that shows QDeclarativeImageProvider in action. You can find it in
$(path_to_Qt_source)/examples/declarative/cppextensions/imageprovider
or online at the Qt git repository [qt.gitorious.org]
Check if you forgot an important step, post here your results =)
thats exactly the example i am using…except instead of using it as a plugin i am trying to use it in main.cpp.
I have commented out the QDeclarativeExtensionPlugin.
and included
- QDeclarativeEngine engine ;
- engine.addImageProvider("colors", new ColorImageProvider);
in main.cpp.
I put debug statements in requestPixmap function and found out that the function is never called.
You must log in to post a reply. Not a member yet? Register here!



