[Interest] QTableView, QSqlRelationalTableModel and QDateTimeEdit and timezones

Lisandro Damián Nicanor Pérez Meyer perezmeyer at gmail.com
Fri May 1 14:52:43 CEST 2020


Hi Tony!

On Fri, 1 May 2020 at 02:00, Tony Rietwyk <tony at rightsoft.com.au> wrote:
>
> Hi Lisandro,
>
> AFAIK that is a bug in the design of the Qt SQL api's.  There is no way
> to specify to QSqlField/QSqlResult that the date being read is UTC.  You
> have to read the QSqlQuery yourself, convert the QVariant to QDateTime,
> apply the time spec, then pass the value to the UI.
>
> Maybe you can derive from QSqlRelationalTableModel and override the data
> method to set the time spec?

I see.Maybe I'll try this, yes. I'll come back with the results if I
get to do it.

Thanks!

-- 
Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/


More information about the Interest mailing list