Using Flickable::resizeContent with mouse



  • Hi!
    I want resize content on onDoubleClicked, but Flickable::resizeContent demands the third parameter as QPointF type. How can I obtain this from mouse. I have only mouse.x and mouse.y
    @
    onDoubleClicked: {
    var cW = flick.contentWidth1.1
    var cH = flick.contentHeight
    1.1
    var center =mouse.x <- ????
    flick.resizeContent(cW,cH,center);
    }
    @



  • bq. Resizes the content to width x height about center.

    If you want to go ahead and keep it's center-point: That would be for x-coordinate in center: flick.x+(flick.width/2) and for y-coordinate: flick.y+(flick.height/2). Also you could pass it's originX and originY.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.