[Solved] QdeclarativeImageprovider issues
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 ?
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
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.
- QDeclarativeEngine engine ;
- engine.addImageProvider("colors", new ColorImageProvider);
I put debug statements in requestPixmap function and found out that the function is never called.