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 determine the number of items per row in GridView
Forum Updated to NodeBB v4.3 + New Features

How to determine the number of items per row in GridView

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

    Trying to get this grid centered regardless of how many items show up in a row (could change depending on screen resolution). If I can get the number of items in a GridView "row" then I can get it done. How to?

    --Duff

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

      There is no direct way to identify the rows. Gridview dynamically puts the items based on the cellwidth and height specified. You can findout based width/cellWidth specified. Here I'm assuming that width and height specified delegate also matches with cellWidth and CellHeight

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

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Duff
        wrote on last edited by
        #3

        Okay, thanks.

        --Duff

        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