> Hi, > > My second question here, > > In order to override the data() method from a QSqlTableModel, I need to > subclass it. > > So I go > * > import com.trolltech.qt.QVariant; > import com.trolltech.qt.core.QModelIndex; > import com.trolltech.qt.core.QObject; > import com.trolltech.qt.sql.QSqlDatabase; > import com.trolltech.qt.sql.QSqlTableModel; > > public class SqlTableModel extends QSqlTableModel{ > > private QVariant V=new QVariant(); > > public SqlTableModel(QObject O,QSqlDatabase D){ } > > @Override public QVariant data(QModelIndex I,int R){ > > return V; > } > > }*
I think you should call super(O,D) in the constructor. Here you have and example using C++: http://doc.qt.nokia.com/4.6/sql-querymodel.html > Regards > > Ralf -- I.S.C. José Arcángel Salazar Delgado Gerente de I+D Tel. oficina: 229-2-72-72-46
<<logo.png>>
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Qt-jambi-interest mailing list Qt-jambi-interest@qt.nokia.com http://lists.qt.nokia.com/mailman/listinfo/qt-jambi-interest