Project

General

Profile

Feature #7786

WStandardItemModel::insertRow returns void instead of WStandardItem*

Added by Velvet Jones 8 days ago. Updated 3 days 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?

#1

Updated by Velvet Jones 8 days 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?

#2

Updated by Velvet Jones 3 days ago

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

Also available in: Atom PDF