Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the "editing finished" signal of a QTableView item?

Tags:

qt4

qtableview

I want to know when user has finished editing a QTableView item, so I checked all the available signals, but I only found ones that will emit before the edit.

So, what should I do now?

Running Qt 4.8.4

like image 887
daisy Avatar asked Apr 29 '13 06:04

daisy


1 Answers

Since your QTableView will have attached a model, connect to its signals,

eg void QStandardItemModel::itemChanged ( QStandardItem * item ) [signal]

or, more generally:

void QAbstractItemModel::dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight )

You can, also, connect to the selection model signals.
Usually, when you finish editing an item, focus changes to next, so selectionmodel will fire currentChanged but this hasnt to be general.

like image 79
trompa Avatar answered Sep 20 '22 21:09

trompa