QT 4.4 and timedelta

A

admoore

Maybe I'm missing something obvious, but is there a QT object to
represent time intervals, a la datetime.timedelta?

I'm working on a utility that displays database query results from a
postgres database (using psycopg2) in a QTableView. For columns
created using "age(some_date_column)", I get a datetime.timedelta
object from psycopg2.

What I'd like is to be able to format this column in a friendly way
(say "7 years, 2 months, 4 days"), yet have the QTableView treat it
properly (e.g. for sorting purposes, not sorting it lexically but by
the actual length of time).

Anyone have any input or ideas on this?
 
M

Mohamed Yousef

I'm not very sure about this , but it's logicallay enough to be said
i think the QTableView ordering mechanism must provide some overriding
functionality through accepting a comparing function from you
check it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,250
Latest member
Charlesreero

Latest Threads

Top