[Qt-interest] Submitting changes in a QTableView

Malyushytsky, Alex alex at wai.com
Thu Jul 9 00:26:11 CEST 2009


Through the calls to the following?

void QAbstractItemView::commitData ( QWidget * editor )
void QAbstractItemView::closeEditor ( QWidget * editor,

Regards,
  Alex

-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Lars Amsel
Sent: Wednesday, July 08, 2009 7:44 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Submitting changes in a QTableView

Hi,

I have a QTableView with an editable model that is derived from
QAbstractListModel. Furthermore there is toolbar button that should do some
calculations with the values of the table view. Because the toolbar button is
not focusable the table doesn't loose the focus and the current edited value
is not commited to the model.
How do I ask the table to stop editing and commit remaining changes? Sure I
could send a return key to the current editor, but that doesn't seem to be the
most elegant way.

regards

Lars
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest


---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."

"Please consider our environment before printing this email."




More information about the Qt-interest-old mailing list