Seite 2 von 2

Re: QDate wir mach eseinfacher

Verfasst: 30. Juli 2011 19:52
von franzf
"String" und "String Literal" wären nicht schlecht.

Re: QDate wir mach eseinfacher

Verfasst: 30. Juli 2011 19:57
von ScyllaIllciz
QString QDate::toString ( const QString & format ) const

Returns the date as a string. The format parameter determines the format of the result string.

These expressions may be used:
Expression Output
d the day as number without a leading zero (1 to 31)
dd the day as number with a leading zero (01 to 31)
ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses QDate::shortDayName().
dddd the long localized day name (e.g. 'Monday' to 'Sunday'). Uses QDate::longDayName().
M the month as number without a leading zero (1 to 12)
MM the month as number with a leading zero (01 to 12)
MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses QDate::shortMonthName().
MMMM the long localized month name (e.g. 'January' to 'December'). Uses QDate::longMonthName().
yy the year as two digit number (00 to 99)
yyyy the year as four digit number. If the year is negative, a minus sign is prepended in addition.
Daran sollte man erkennen das ein String verlangt wird. Und wie sollte das sonst gehen?

Re: QDate wir mach eseinfacher

Verfasst: 30. Juli 2011 21:39
von Christian81
z.B. was die Klasse QString macht und was eine Zeichenkette ist -> C++ Grundlagen.