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. How to place inside flickable other components
Forum Updated to NodeBB v4.3 + New Features

How to place inside flickable other components

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 253 Views
  • 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
    DmitryTS
    wrote on last edited by
    #1

    Hello, I have a question, there is a design of the species:

    ...
    Flickable{
    id: flick
    anchors.fill: parent
    ColumnLayout{
    id: col
    anchors.fill: parent
    Repeater{
    model: ["1", "2", "3"]
    delegate: ...
    }
    }
    }
    ...
    it works and does not cause any warnings and errors, but in the documentation for Flickable I read: "Note: Due to an implementation detail, items placed inside a Flickable cannot anchor to the Flickable. Instead, use parent, which refers to the Flickable's contentItem. The size of the content item is determined by contentWidth and contentHeight."
    This means that my piece of code is incorrect and needs to be rewritten? if so, how the design should look based on the documentation?
    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SuhasKrishanamurthy
      wrote on last edited by
      #2

      There’s nothing wrong with your current code — you are already doing it right.
      The documentation is just warning you not to accidentally anchor to flick.

      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