Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

[SOLVED]Qt Quick and QML Image Zoom

$
0
0
Hi there ! I’ve got a problem on moving on my image when i zoom on it. Basically, i scale the image to reproduce a zoom. What i’m doing now is translating the image.  property int transformX:0;     property int transformY:0;     Rectangle         {             id:borderEmulation;             color: "lightgray";             clip: true               anchors             {                 fill: parent;                 margins: 2;             }             Image             {                 id: visibleImg;                 source: "qrc:/visible";                 antialiasing: true;                 fillMode: Image.PreserveAspectFit;                 //transformOrigin: Item.Center;                 transform: Translate { y: transformY*visibleImg.scale; x: transformX*visibleImg.scale }                 anchors                 {                     fill:parent;                     bottomMargin: myProgressBar.height+10;                     margins: 2;                 }             }   } And 4 button that increase / deacrease by 20 the transform(X/Y). My point is : is here a way to know when i’m zooming out of my picture ? ie. when i have to stop my translation because the right/left/top/bottom end of the image is displayed ? Regards

Viewing all articles
Browse latest Browse all 13965

Latest Images

Trending Articles



Latest Images