Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Retired
Posts: 155
Registered: ‎07-16-2012
My Device: Dev Alpha
My Carrier: Bell

Re: Files system access.

Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: Files system access.

Hi amarcon,

when we are adding scalling method n setting maxHeight n width..it comes with black block of the same size as scaled.

I attach the source code for that so you can test it at your end.

Retired
Posts: 155
Registered: ‎07-16-2012
My Device: Dev Alpha
My Carrier: Bell

Re: Files system access.

Hi meghasanghvi,

 

there is a Knowledge Base article about how to do this, please have a look at http://supportforums.blackberry.com/t5/Cascades-Development-Knowledge/Using-QImage-and-QPainter-to-P...

 

Hope this helps.

Developer
Posts: 107
Registered: ‎05-11-2011
My Device: BlackBerry Z10 LE
My Carrier: AirTel

Re: Files system access.

Hi,

 

i got solution.

 

I this is my qml file

import bb.cascades 1.0

Page {
    content: Container {
        ImageView {
            id: myImageView
            imageSource: "../../../shared/camera/icon.png"
        }
        Button {
            text: "Button"
            onClicked: {
                myImageView.imageSource = "../../../shared/camera/sf.jpg" 
                //myClass.showToast()
            }
        }
    }
}

if i put this file in folder assets/Qml  then not working

and if i put this file to assets then it's working .

 

is this bug ?

 

what is BlackBerry Development Advisor's advice about this ?

 

Retired
Posts: 155
Registered: ‎07-16-2012
My Device: Dev Alpha
My Carrier: Bell

Re: Files system access.

Hi raj_jyani,

 

If you changed the folder of your qml, like you did, you will need to add one more "../"

 

If you will be adding folders for your qml files, perhaps you should consider to use the absolute path instead, such as:

 

imageSource: "file:///accounts/1000/shared/camera/IMG_09.png"

 Hope this helps.

 

Cheers,