Project

General

Profile

Bug #3371

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

Added by Alexander Morozov about 8 years ago. Updated almost 8 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
#1

Updated by Koen Deforche almost 8 years ago

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

Updated by Koen Deforche almost 8 years ago

  • Status changed from InProgress to Resolved
#3

Updated by Koen Deforche almost 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF