[Solved] How to use qml to display a specified part of a picture
-
Can you explain a bit more? You want to display a piture in some position on the screen or you want to display some part of image?
Taka a look at "Image.fillMode":http://doc.qt.nokia.com/4.7-snapshot/qml-image.html#fillMode-prop
-
I want to display some part of a image, and I guess the only way to do it is pointed out by ZapB~ Thank u for replying!
[quote author="task_struct" date="1317632528"]Can you explain a bit more? You want to display a piture in some position on the screen or you want to display some part of image?
Taka a look at "Image.fillMode":http://doc.qt.nokia.com/4.7-snapshot/qml-image.html#fillMode-prop[/quote]
-
hi guys, I solved this in this way!
@
Rectangle{
id: login
clip: true
width: 80
height: 25
Image {
id: loginButton
x: 80
y: 0
source: "./image/Login_btn_login.png"
}
}
@
Put an image in a rectangle change x and y of the image, until get the right part of the image! Cheers!Edit: Be sure and wrap code in @ tags; mlong
-
I`ve just wrote similar example :)