Documentation QAbstractItem::insertRow



  • 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.



  • Thank you for reporting this.

    Our doc team will review it soon.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.