[Qt-interest] Issue with QDataWidgetMapper & QCheckBox
Timothy Reaves
treaves at silverfieldstech.com
Sun Dec 13 22:34:23 CET 2009
I have a a QDataWidgetMapper set up for a form. There are two QCheckBoxes on this form. The values display the checked state properly, but changes are not saved. When I call submit() on the mapper, it fails with this error:
QSqlError(20, "Unable to fetch row", "datatype mismatch")
The two columns are defined as BOOLEAN in a SQLite database. When I listen to the table model beforeUpdate, the fields are being passed as QString "true" or "false". What is the correct way to convert them to BOOLEAN?
More information about the Qt-interest-old
mailing list