[Qt-interest] SQL table edition bug
Damien Tardy-Panis
damientardypanis at gmail.com
Sun Aug 8 11:56:08 CEST 2010
Anybody here to help me with that, please ?
2010/8/5 Damien Tardy-Panis <damientardypanis at gmail.com>
> Hi everybody,
>
> I'm currently working on a software to edit a database and I'm facing some
> problems with that edition...
>
> More precisely, there are some bugs when I try to insert a row in a table
> and edit it.
>
> To have an example of what I'm talking about :
> - open qt examples and demos
> - section Demonstrations, then launch SQL Browser
> - select "use predefined in-memory database" and open the movies table for
> example
> - now right click on a row and "insert Row"
> - edit that new row : change the title field for example
> - edit another row : change the director field for example
> - click on another row and ... surprise !
>
> I found some bug reports about this ... but these have not yet been
> resolved
> http://bugreports.qt.nokia.com/browse/QTBUG-772
> http://bugreports.qt.nokia.com/browse/QTBUG-2725
>
> This is due to the QSqlTableModel::OnRowChange edit strategy that seems
> buggy.
>
> To overcome this, I use the OnManualSubmit strategy and try to simulate the
> behaviour the OnRowChange should have, as described in the first bug report.
>
> You can find my code attached.
> The file just contains the main parts of my code related to this
> implementation, with some comments.
>
> But there are still some problems during the edition.
>
> Any idea about either my code or another way to achieve this behaviour ?
>
> Thanks,
>
> Damien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100808/f91661cf/attachment.html
More information about the Qt-interest-old
mailing list