Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Qt.io webservices
  4. Documentation QAbstractItem::insertRow
Forum Updated to NodeBB v4.3 + New Features

Documentation QAbstractItem::insertRow

Scheduled Pinned Locked Moved Qt.io webservices
2 Posts 2 Posters 3.8k 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.
  • V Offline
    V Offline
    videl
    wrote on last edited by
    #1

    Documentation says:

    <quote>
    @bool QAbstractItemModel::insertRow ( int row, const QModelIndex & parent = QModelIndex() )@

    Note: The base class implementation of this function does nothing and returns false.
    Inserts a single row before the given row in the child items of the parent specified.
    Returns true if the row is inserted; otherwise returns false.
    </quote>

    however insertRow actually calls insertRows method, see the source code:

    @inline bool QAbstractItemModel::insertRow(int arow, const QModelIndex &aparent)
    { return insertRows(arow, 1, aparent); }@

    Secondly, I think the term base class is being misused. According to documentation, method insertRow is not virtual, so there is no possibility to overrite it. Other interpretation is that base class is refering to QAbstractItemModel's base class -- QObject, but it wouldn't make any sense.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gurudutt
      wrote on last edited by
      #2

      Thank you for reporting this.

      Our doc team will review it soon.

      Release Manager - Qt Development Frameworks

      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