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. Gridview with empty cells or GridLayout with animation
Qt 6.11 is out! See what's new in the release blog

Gridview with empty cells or GridLayout with animation

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 1.9k 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.
  • T Offline
    T Offline
    Tobias F
    wrote on last edited by
    #1

    Hi all,

    I wan't to display some data in a GridView but I want to control the row and column of an item via the model that is inherited from a QAbstractItemModel. But as far as I can see in the documentation i cannot influence the row/column of an item but I need some "empty" cells.
    The thing that seems to match best is a GridLayout with it attached properties Layout.Row and Layout.Column. But the GridLayout is missing the transitions when an item is moved/added/removed. So is there anything in QT that enables me to position the items in a grid manually and provide support for animations when an item is moved?

    Thanks a lot

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      GridLayout is the only option. If you want the animation, you can add your animation by looking at some signals of GridLayout.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      3
      • raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        i think QML Bahviors (on the pos property on each item in the layout) should do what you want?

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        1

        • Login

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