06-11-2012 06:03 AM
I want to load the image from particular location of my file system but image is not loaded and i am not able to see the image on siumulator.
Below is my code for the same.
Image image = Image(QUrl("D:\Megha\linux.png"));
ImageView* pMyImageView = ImageView::create();
Page *page = new Page();
But no image is displyed
Solved! Go to Solution.
06-11-2012 07:44 AM
You hardcoded the path to D: Presumably this file is not in that location on the simulator or the device.
See the documentation in https://developer.blackberry.com/cascades/referenc
Image inherits from Resource, so has isNull(). QUrl has both isValid() and isEmpty().
You should add some defensive code.