PDA

View Full Version : QLocale::LongFormat minus timerzone



apm
27th July 2017, 23:24
I am having an issue displaying a localized time. My current code is this:



mpLongTime->setText( locale.toString( time, QLocale::LongFormat ) );


I need to display a time in LongFormat, but without the timezone that is appended to the string. Unfortunately, setting the format to "HH:MM:SS A" does not work because it is fixed, and some languages like Chinese don't use the colons (other characters are used). Is there a way to do this?