On Friday 09 February 2007 14:45:14 Matthias Lechner wrote: > Hi everyone, > > I'm currently facing the problem of creating a read-only model for a SQLite > database. Within the database I have one table which has a field "contact" > which refers to a contact person defined in another table "contacts". > > First I tried to use the QSqlRelationalTableModel, but I'm unable to > disable the edit mode. Furthermore there seems to be no option to define > relations to multiple columns (e.g. I want to display a contact by "Contact > name (phone number)"). > > So I decided to reimplement QAbstractTableModel, but this requires a lot of > (unnecessary) work and I feel like I'm reinventing the wheel. > > So the question is: is it really that hard to create a read-only relational > model or do I miss something? > > Best regards > Matthias > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to > >> unsubscribe << I'm not a qt expert by any means but if you override the flags() method to not return editable, will that not do what you want it to do? -- chris >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<