PDA

View Full Version : building a UI mapped to a class.



coding_neo
15th October 2011, 15:01
Hello:
I have a question concerning building a database driven application. I have a person class:


class Person
{
QString name;
QString phone_number;
};


I would like to build a corresponding UI to this class. And when the User hits the "Submit" button on the UI the Person class gets populated from the data of the UI and then this populated object is used to insert the data in a database. WHat I am not clear is as to how should the links between the UI, the class object be maintained so as to achieve the above behavior.

ChrisW67
16th October 2011, 03:43
QDataWidgetMapper, QSqlTableModel (and related) and Model/View Programming (model-view-programming.html)