Re: [PyQt] QSqlQueryModel write subclass

2007-10-21 Thread Linos
well my model its working now (i have tested with tableview and datawidgetmapper) but i have a question to the list about the way i have designed it, now i load with a select the model (original sqlquerymodel) and when from the view add new rows i use an internal buffer (a list of python objects

Re: [PyQt] QSqlQueryModel write subclass

2007-10-20 Thread Linos
David thanks for your reply i get this to work yesterday, the problem was that i was not implementing rowcount() so the new line was painted in the view but it did not have real index so data() and setdata() could not use it, i am today working in a Qsqlquerymodel subclass with a buffer of rows

Re: [PyQt] QSqlQueryModel write subclass

2007-10-19 Thread David Boddie
On Wednesday 17 October 2007 12:14:52 +0200, Linos wrote: > I am goin crazy with this problem, i have tested with qsqltablemodel > subclassing and it works ok if a dont write the insertRows method in the > subclass: > > (model) > class SkudaSqlTableModel(QSqlTableModel): >     def __init__(self, d

Re: [PyQt] QSqlQueryModel write subclass

2007-10-17 Thread Linos
I am goin crazy with this problem, i have tested with qsqltablemodel subclassing and it works ok if a dont write the insertRows method in the subclass: (model) class SkudaSqlTableModel(QSqlTableModel): def __init__(self, dbcursor=None): super(SkudaSqlTableModel, self).__init__() (QD

[PyQt] QSqlQueryModel write subclass

2007-10-11 Thread Linos
Hello, i am trying to subclass QSqlQueryModel to write with it, i need this because not qsqltablemodel or qsqlrelationaltablemodel fills my needs, i would like to do joins and insert in multiple tables, i have implemented "flags" and "setData" methods and it works ok now, i have made a "