Автор: sbar 22.3.2009, 17:30
Следующий код:
qDebug("%s", qPrintable(QDate::currentDate().toString("MMMM")));
выдает в GNU/Linux "марта", а в Windows — "Март". Почему так сделано? Как правильней всего выводить одинаковое в разных ОС (ни уж то делать свой список с месяцами?)?
Автор: Litkevich Yuriy 22.3.2009, 17:35
Цитата(sbar @ 22.3.2009, 20:30)
выдает в GNU/Linux "марта", а в Windows — "Март"
повсей видимости эта информация берется из самой ОС
Автор: sbar 22.3.2009, 17:37
Самое забавное то, что например в QDateEdit под Windows опять же выдается "марта".
Автор: Litkevich Yuriy 22.3.2009, 17:38
Цитата
QString QDate::longMonthName ( int month ) [static]
Returns the long name of the month using the following convention:
1 = "January"
2 = "February"
3 = "March"
4 = "April"
5 = "May"
6 = "June"
7 = "July"
8 = "August"
9 = "September"
10 = "October"
11 = "November"
12 = "December"
The month names will be localized according to the system's locale settings.