[Qt-interest] QItemDelegate and QDateEdit
Israel Brewster
israel at frontierflying.com
Thu Jun 11 22:56:56 CEST 2009
On Jun 11, 2009, at 11:47 AM, Israel Brewster wrote:
> I have a QTableView to which I have applied custom delegates that
> display a QDateEdit on one column and a QTimeEdit on another when
> editing. By setting the display format for each in the createEditor
> function, I have them displaying their values in ISO format (yyyy-MM-
> dd and H:mm:ss). I need the values to be stored in the same format.
> But after the editor closes, the values are inserted into the table
> in standard format, i.e. 6/11/09 and 11:45 am. Of course the table
> itself doesn't care, and the editors still work, but if the values
> are stored in that format it could seriously mess up my data storage
> and retrieval. How can I get the dates/times stored in ISO format?
> Or is it really working fine, just displaying wrong? Thanks.
Oh, looks like the setModelData function can be overloaded to do what
I want. Unless someone has a better idea. Thanks for looking! :)
-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
> -----------------------------------------------
> Israel Brewster
> Computer Support Technician II
> Frontier Flying Service Inc.
> 5245 Airport Industrial Rd
> Fairbanks, AK 99709
> (907) 450-7250 x293
> -----------------------------------------------
> <Israel Brewster.vcf>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 397 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090611/0f7542dd/attachment.bin
More information about the Qt-interest-old
mailing list