06-11-2012 06:03 AM
Hi,
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();
pMyImageView->setImage(image);
Page *page = new Page();
page->setContent(pMyImageView);
Application::setScene(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.
Stuart
06-13-2012 08:23 AM
Did you get past your issue?
If so, please close the thread by accepting a solution.
If not, where do you now need help?
Stuart