Project

General

Profile

Actions

Feature #7786

open

WStandardItemModel::insertRow returns void instead of WStandardItem*

Added by Velvet Jones about 4 years ago. Updated about 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/16/2020
Due date:
% Done:

0%

Estimated time:

Description

The following should work:

tableview->select(model->indexFromItem(model->insertRow(model->rowCount(),items)));

Is there another simple way to select the row I just inserted?

Actions #1

Updated by Velvet Jones about 4 years ago

Ugh, I just realized that it probably doesn't make sense to return just one of the items in 'items'. But the question still stands; how to select a row I just inserted?

Actions #2

Updated by Velvet Jones about 4 years ago

I suppose WStandardItemModel::appendRow() and insertRow() should return a WModelIndex.

Actions

Also available in: Atom PDF