[Qt-interest] SQLITE3 and column type

Wilhelm wilhelm.meier at fh-kl.de
Mon Oct 11 13:21:57 CEST 2010


Am 11.10.2010 11:07, schrieb Raul Metsma:
> Subclass QSqlQueryModel/QSqlTableModel and return on data( QModelIndex 
> &, Qt::DisplayType/Qt::EditType ) QDateTime
>   

That leds to a table-specific table-model ...

I did it actually with a specific QItemDelegate for that column.

But I was looking for a possibility to "override" the column-type of the
sqlite-table (which is "text"), so that the QItemEditorFactory could
pick the right delegate.

> Raul
>
> On 10/11/2010 11:00 AM, Wilhelm wrote:
>   
>> Hi,
>>
>> due to the fact, that sqlite is typeless, I get also a "normal" editor
>> when I edit a field in a QTableView.
>>
>> How can one achieve, that e.g. a QDateTimeEdit  is created?
>>
>> I think, one should set the column type explicit, but I don't know how.
>>
>> Any hints?
>>
>>     
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   


-- 
Wilhelm





More information about the Qt-interest-old mailing list