[Qt-interest] Draw QDateTime with QAbstractItemDelegate

Israel Brewster israel at frontierflying.com
Thu Dec 31 01:06:16 CET 2009


I am trying to figure out how to use a QAbstractItemDelegate to draw a  
QDateTime value in easily readable form. It would appear that I have  
to override the paint() function (which is lower level than I would  
think I should have to deal with), and then do something with a  
QStyleOptionSpinBox, but I can't figure out how to make it work. The  
example in the documentation shows using a QStyleOptionProgressBar,  
which is easy as you just have to set the min, max, and progress  
properties. however, I don't see anything like a text, date, or time  
or even value property that I can set for a QStyleOptionSpinBox. How  
can I set this to display nicely? Thanks.
-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091230/1a6ee703/attachment.html 
-------------- 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/20091230/1a6ee703/attachment.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091230/1a6ee703/attachment-0001.html 


More information about the Qt-interest-old mailing list