[Qt-interest] Issue with QDataWidgetMapper & QCheckBox

Israel Brewster israel at frontierflying.com
Mon Dec 14 18:36:57 CET 2009


On Dec 14, 2009, at 1:18 AM, Jan wrote:

> afaik sqlite has no BOOLEAN datatype. I am using 'true'/'false' in my
> sqlite databases. Works fine with QDataWidgetMapper.

That is true- sort of. SQLite may recognize the BOOLEAN data type when  
declaring columns or the like (not sure), but it doesn't enforce it,  
or any other data type for that matter. what this means is that while  
you can declare a column as a certain data type, SQLite doesn't care  
what type of data is actually stored in it- you can, in fact, mix all  
types in a single column. See http://www.sqlite.org/datatype3.html

>
> Jan
>
> Timothy Reaves schrieb:
>
>>> 	I am setting the mapping thus:
>>>
>>> telescopeMapper->addMapping(ui->telescopeVFlip, 4, "checked");
>>> telescopeMapper->addMapping(ui->telescopeHFlip, 5, "checked");
>>>
>>> Is that not correct?
>>
>>
>> 	I think this might be because Qt is sending true & false (as  
>> string), and the sqlite can not convert to the 1 or 0 (as int) that  
>> is its BOOLEAN datatype.
>>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 417 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091214/0ed1f233/attachment.bin 
-------------- next part --------------




More information about the Qt-interest-old mailing list