Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Roles for model in header not showing

    QML and Qt Quick
    1
    1
    71
    Loading More Posts
    • 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
      dmendizabal last edited by

      I have a problem that only happens in Qt5.11 and up.
      The same code works well in Qt5.9.

      ListView {
          id: id_listView
          delegate: id_delegate
          header: id_header
          headerPositioning: ListView.OverlayHeader
          model: modelReport
          snapMode: ListView.SnapToItem
          clip: true
      
          Component {
              id: id_delegate
              ....
           }
      
          Component {
              id: id_header
      
                  Row {
                      id: id_row
      
                      Repeater {
                          id: id_labelsHeader
                          model: modelHeader
      
                          Label {
                              text: role_c0
                          }
                      }
                 }
          }
      }
      

      modelReport is read correctly and the data is shown in the delegate id_delegate.
      modelHeader shows nothing. The role role_c0 is empty
      Both models are created in C++ as derivative from QStandardItemModel

      What could be the difference between Qt5.9 and Qt5.11?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post