Project

General

Profile

Actions

Bug #3371

closed

WTableView does not call any an item delegate methods on removing rows

Added by Alexander Morozov over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
06/23/2014
Due date:
% Done:

0%

Estimated time:

Description

I use my class derived from WAbstractItemDelegate for creating item widgets in WTableView.

Each widget contains WModelIndex to modify its contents when user interacts with it.

On inserting row at beginning WTableView calls update() method of delegate for all table items.

So delegate can update model indexes in widgets.

But on removing row at beginning WTableView does nothing and widgets contain wrong model indexes that leads to showing wrong data after interacting with them.

WAbstractItemDelegate contains updateModelIndex() method but it is not called by WTableView.

I attached an example. Items contain buttons with numbers. Clicking on these buttons adds/removes [] around a number. After clicking on "Add" and after on "Remove" item buttons start to show numbers incremented by 1.


Files

modelview2.cpp (4.15 KB) modelview2.cpp Alexander Morozov, 06/23/2014 04:28 PM
Actions #1

Updated by Koen Deforche about 10 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.3.4
Actions #2

Updated by Koen Deforche about 10 years ago

  • Status changed from InProgress to Resolved
Actions #3

Updated by Koen Deforche about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF