Qt 6.11 is out! See what's new in the release
blog
Time format in QTableView with QSqlTableModel
General and Desktop
5
Posts
3
Posters
6.5k
Views
1
Watching
-
Hello all,
I have QSqlTableModel connected to MySQL table where one column has type 'time'.
This column is used to store amount of time and I need to show it in hh:mm:ss format.
But in connected QTableView it is shown as 12:10 AM instead of 00:10:00.Is there any way how to change the time format for this?
Thanks in advance,
Jaroslav
-
@QString QTime::toString ( const QString & format ) const@
Format Result
hh:mm:ss.zzz 14:13:09.042
h:m:s ap 2:13:9 pm
H:m:s a 14:13:9 pm