Project

General

Profile

Actions

Support #1175

closed

WItemDelegate question

Added by Anonymous about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
03/02/2012
Due date:
% Done:

0%

Estimated time:

Description

If you have a tableview and create a delegate and set the edit trigger for a column.. how do you then connect to

for example the returnPressed() signal to act on the changed value?

tableview->setEditTriggers(WAbstractItemView::SingleClicked);

WItemDelegate* delegate = new WItemDelegate(this);

tableview->setItemDelegateForColumn(0, delegate);

Actions #1

Updated by Koen Deforche about 12 years ago

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche

Hey,

The changed value is received by the model. You should act on the change there. You have several options: you could reimplement the model's setData() method, or you could listen to the dataChanged() signal, or there could be a model specific method.

Regards,

koen

Actions #2

Updated by Koen Deforche about 12 years ago

  • Status changed from Resolved to Closed
  • Target version set to 3.2.1
Actions

Also available in: Atom PDF