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 set the margin for the header and content of a QML ListView?
Forum Updated to NodeBB v4.3 + New Features

How to set the margin for the header and content of a QML ListView?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 200 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.
  • S Offline
    S Offline
    swjqq
    wrote on last edited by
    #1

    As shown in the image, I want to set a margin of 16 between the header and item 0. How can I do that?

    4d9395ff-11a5-4891-a5bd-505105be9135-image.png

    1 Reply Last reply
    0
    • GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote on last edited by
      #2

      You could add this margin in the header component itself.
      ListView leftMargin can't be used here since it puts the margin on the left of header.

      If using a Control as the header you could use rightPadding or rightInset to easily add a inside margin.

      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