It depends if they are related to each other. If you have a complex requirements, I'd suggest subclassing QAbstractTableModel instead of QSqlQueryModel as suggested above as this will give you more control and flexibility.Originally Posted by munna
With Qt4.2+ there is a specialised class called QDataWidgetMapper for that. For earlier versions you have to implement that functionality yourself using signals and slots.2. The view is not the usual table or tree but is combination of QLineEdit, QTextEdit, QLabel..ect. How can these widgets communicate with the model ?
Once again, Qt 4.2 provides a framework for undo/redo. If you have access to Qt Solutions, there is a solution for for undo/redo too. If you wish to implement it yourself, I'd suggest connecting to dataChanged signal in the model or subclassing the model and implementing the functionality in reimplemented setData, insertRow and removeRow.3. How can I implement undo/redo using MVC ? Some tutorial or link would be great.
Bookmarks