Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109653

QML TreeView/TreeViewDelegate - Unable to assign [undefined] to QString

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.1
    • Quick: Controls 2
    • None
    • Windows 11 22H2 Build 22621.963
      Qt 6.4.1
      Qt Creator 9.0.1
      CMake 3.24.2
      Ninja 1.11.0
    • Windows

    Description

      With a model like this:

      auto model	= new QStandardItemModel();
      auto root	= model->invisibleRootItem();
      root->setColumnCount( 3 );	
      
      auto node1	= new QStandardItem( "Node 1" );
      node1->appendRow( { new QStandardItem( "N1 C1" ), new QStandardItem( "N1 C2" ), new QStandardItem( "N1 C3" ) } );
      root->appendRow( node1 );
      
      auto node2	= new QStandardItem( "Node 2" );
      node2->appendRow( { new QStandardItem( "N2 C1" ), new QStandardItem( "N2 C2" ), new QStandardItem( "N2 C3" ) } );
      root->appendRow( node2 );

       

      The QML TreeView/TreeViewDelegate, renders this:

      Output:

      qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/TreeViewDelegate.qml:59:9: Unable to assign [undefined] to QString
      qrc:/qt-project.org/imports/QtQuick/Controls/Fusion/TreeViewDelegate.qml:59:9: Unable to assign [undefined] to QString
      ...
      

       

      For QTreeView it looks like that:

       

      I would have expected the same behaviour, is this assumption wrong?

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Marscho Marscho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes