Frage

I'm writing an app using python2, qt and elixir. The app fetches data from the sqlite databate to a list of elixir objects and store that in a variable inside a QAbstractTableModel subclass I created to handle the data.

I can view and update the data in memory just fine. However, in order to commit changes to the database file (using elixir), the function session.commit() needs to be called.

My question is then, where do I call it? Is there a signal in QAbstractTableModel that gets emitted after data is changed?

War es hilfreich?

Lösung

You have lots of signals such as dataChanged (probably the one that you want) in QAbstractItemModel:

http://doc.qt.digia.com/stable/qabstractitemmodel.html

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top