Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Using Flickable::resizeContent with mouse
Forum Updated to NodeBB v4.3 + New Features

Using Flickable::resizeContent with mouse

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dimidroll93
    wrote on last edited by
    #1

    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);
    }
    @

    1 Reply Last reply
    0
    • O Offline
      O Offline
      onek24
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved