01-08-2013 03:29 AM - edited 01-08-2013 03:30 AM
It works! But you create a QNetworkDiskCache per Image ! It should be better to create one in the same QNetworkAccessMAnager Instance.
01-08-2013 10:54 AM
Oops, I had forgot to change that. I've updated the disk cache to be static.
01-11-2013 11:13 PM - edited 01-11-2013 11:15 PM
How can i use WebImageView when referencing from C++?
For instance, I add the component to QML and want to reference and change properties from C++, for instance I want to use the setUrl function. However, I cant get WebImageView to be recognized in C++.
I did add this line
qmlRegisterType<WebImageView>("org.labsquare", 1, 0, "WebImageView");
I'm kinda new to Cascades, sorry for noob question.
01-11-2013 11:19 PM
Hi Paratheo,
All you need to do is
#include "WebImageView.h"
in the c++ class that you want to use it in.
In terms of passing a WebImageView object to C++ from QML, please reference my post on how to pass a Button to C++ from QML: http://supportforums.blackberry.com/t5/Cascades-De
01-11-2013 11:32 PM - edited 01-12-2013 12:08 AM
I already had the include there, however your method of passing button to C++ worked great, Thanks!
One more quick question, how can I listen for WebImageView source changed and react to it all in QML?
Also, is there any way to change scaling, for instance to have it 'fill' rather than 'stretch' or 'fit'
01-12-2013 12:27 AM - edited 01-12-2013 12:29 AM
You could simply monitor the WebImageView.url property through another object.
Alternatively, when the url changes, urlChanged is emitted. I think that you could connect to it by using the id of your WebImageView, for example, in the page you could define
onCreationCompleted: {
idOfWebImageView.urlChanged.connect(myfunction);
}
function myfunction() {
//logic here
}
In terms of scaling, use the same properties as you would for an ImageView since it is the super class of WebImageView: https://developer.blackberry.com/cascades/referenc
03-12-2013 07:19 AM
This is more than awesome. Thanks a lot.
04-13-2013 12:08 AM
I have an error I do not understand.
"module" org.labsquare "is not installed
org.labsquare import 1.0 "
I install the module?
04-13-2013 12:34 AM
Just ignore that annoying issue. Your app will work regardless of that.
3 weeks ago
Hi.. i try to use this class, but when i build, it has error :
fatal error: QDesktopServices: No such file or directory
i've added " QT += network " in the pro file,
what am i done wrong?