PDA

View Full Version : QML How to use Ractangles as Frames for Images



Zschneidi
16th March 2010, 18:35
Hello community, I'm new here in this forum and I first wanna say ! Hello !

About me:

I'm a german programmer trainee. I learn programming for over a year now. I started with C and now I use C++.
I love the Qt framework and spend a lot of time figuring out how to use it. It isn't that easy but I slowly make progress in learning it.

At the moment I try to handle the QML language.

My Problem now is, that is will display an Rectangle with an Image in it.
But I can't figure out how to set the parent Rect. as a kind of frame which the image does not overrun.

It's hard to eyplain what I mean. The Image is infront of the parent rectangle, if the Image is larger than the rect.
the image would not be limited by the rect.
How can I deklare the Rectangle es that kind of frame that will cut of the image, when it becomes larger than the rect. itself ?

I know that the QML isn't official release yet. But maybe there is some way to do somthing like that.
I didn't really found the answer in the examples or demos, but if there is something like that please give me a hint.

Thank you

have a nice day !