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. Qt QML ListView first 3 elements are different then repeated elemnts
Forum Updated to NodeBB v4.3 + New Features

Qt QML ListView first 3 elements are different then repeated elemnts

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 578 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.
  • B Offline
    B Offline
    Bahrouh
    wrote on last edited by
    #1

    Hello Guys,

    Tried to make Qt ListView with 3 different elements in beginning then repeated elements, what is the issue with QML below?

    ListView
    {
        width: 750
        height: 1334
    
        Banner{}
        Bio{}
        EventsNumber{}
    
        model: 9 
    
        delegate: EventCard{}
    
    }
    
    1 Reply Last reply
    0
    • johngodJ Offline
      johngodJ Offline
      johngod
      wrote on last edited by
      #2

      That approach seems wrong, all the element should come from the model. If you need 3 initial elements that somehow dont fit in your model/delegate, consider using them outside the ListView

      B 1 Reply Last reply
      0
      • johngodJ johngod

        That approach seems wrong, all the element should come from the model. If you need 3 initial elements that somehow dont fit in your model/delegate, consider using them outside the ListView

        B Offline
        B Offline
        Bahrouh
        wrote on last edited by Bahrouh
        #3

        @johngod Thanks for your response, using them out site ListView will not make them move with the list,I have read Qt QML ListView Documentation and i got the answer by adding the 3 different elements in header.

        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