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 with dynamic content
Qt 6.11 is out! See what's new in the release blog

Flickable with dynamic content

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 792 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.
  • T Offline
    T Offline
    t3685
    wrote on last edited by
    #1

    Hi!

    I'm trying to make a small board game to practice my QML skills :). I want to use a Flickable element to display the game area. However the game area expands during play, both in negative axis and positive axis.

    The problem is that I can't the Flickable to show all the game area. The Flickable element behaves correctly when the game area grows in the positive directions, but I can't flick to the negative directions.

    My code looks like this:

    @ Flickable {
    id: flickable
    anchors.left: selectionBar.right
    anchors.right: mainWindow.right
    height: parent.height
    z: 0

        contentHeight: background.height
        contentWidth: background.width
        boundsBehavior: Flickable.StopAtBounds
    
        Rectangle {
            id: background
            width: 200
            height: 200@
    

    Does anyone know how to achieve this? Thanks in advance!

    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