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. Flickable problem: Hide un-flickable area
Forum Updated to NodeBB v4.3 + New Features

Flickable problem: Hide un-flickable area

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.4k 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.
  • 2 Offline
    2 Offline
    2beers
    wrote on last edited by
    #1

    hi everyone. I have the following code

    @ Flickable {
    width: 100; height: 100
    contentWidth: image.width; contentHeight: image.height

        Image { id: image; source: "pic.jpg" }
    }@
    

    the image pic.jpg has something around 500x400px and the flickable area is 100x100px. My problem is that I want to hide the area that is NOT flickable and show only the 100x100 part of the image(not entire image).

    How can I do this?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      archerabi
      wrote on last edited by
      #2

      @bq.
      Flickable {
      width: 100; height: 100

      clip:true
      contentWidth: image.width; contentHeight: image.height
      
      Image { id: image; source: "pic.jpg" }
      

      }
      @

      1 Reply Last reply
      0
      • 2 Offline
        2 Offline
        2beers
        wrote on last edited by
        #3

        Thanks archerabi. I searched through documentation all day without any luck.

        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