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

A top level item QStandardItem in QStandardItemModel doesn't return the invisible root item when it's parent() function is called. It returns NULL.

    XMLWordPrintable

Details

    Description

      A top level item QStandardItem in QStandardItemModel doesn't return the invisible root item when it's parent() function is called. It returns NULL.
      Example:

      QStandardItemModel model;
      QStandardItem *item = new QStandardItem("test");
      model.appendRow(item);

      item->parent(); //NULL, should return the invisible root item
      model.invisibleRootItem(); // returns the invisible root item (items parent)
      model.invisibleRootItem()->child(0); //is equal to item

      Attachments

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

        Activity

          People

            maheikki Markku Tapio Heikkilä (Inactive)
            miseppan1 Mikko Seppänen (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes