[Qt-interest] SQL table edition bug
Damien Tardy-Panis
damientardypanis at gmail.com
Thu Aug 5 00:25:26 CEST 2010
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/20100805/681d2639/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: code.cpp
Type: text/x-c++src
Size: 3097 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100805/681d2639/attachment.bin
More information about the Qt-interest-old
mailing list