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

ListView with sections

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

    Hi,
    I have done a list view with sections. List view contains elements like price and seat. In this case, seat will be the section.property and here i need to calculate the total price of each section.
    i.e
    Seat 1
    price - 4
    price - 2

    Seat 2
    price - 6
    price - 4

    I need the sum of each sections like
    Seat 1 - 6 , Seat 2 - 10

    Any help will be appreciated

    ODБOïO 1 Reply Last reply
    0
    • M Mahe

      Hi,
      I have done a list view with sections. List view contains elements like price and seat. In this case, seat will be the section.property and here i need to calculate the total price of each section.
      i.e
      Seat 1
      price - 4
      price - 2

      Seat 2
      price - 6
      price - 4

      I need the sum of each sections like
      Seat 1 - 6 , Seat 2 - 10

      Any help will be appreciated

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #2

      hi,

      @Mahe said in ListView with sections:

      List view contains elements like price and seat. In this case, seat will be the section.property and here i need to calculate the total price of each section.

      How do you create your model ? Can you calculate the total prices before/during the model creation ?

      1 Reply Last reply
      1
      • M Offline
        M Offline
        Mahe
        wrote on last edited by
        #3

        Hi

        It worked @LeLev . Thanks a lot for your suggestion.

        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