QDate, QDateTime Code Examples
http://doc.qt.io/qt-5/qdate.html QDate stCurrentDate = QDate::currentDate(); #define UTC_TIME_ASIA_SEOUL (9 * 60 * 60) // 9h QDateTime stCurrentDateTime; stCurrentDateTime = QDateTime::currentDateTimeUtc(); stCurrentDateTime = stCurrentDateTime.addSecs( UTC_TIME_ASIA_SEOUL ); QDate stDate( 2016, 01, 27 ); QDate stDate( 2016, 01, 28 ); qDebug()
Qt/Classes
2017. 5. 2. 12:01
QString Code examples
http://doc.qt.io/qt-5/qstring.html int math=100, kor=90, eng=80; int res; QString strTotal; res = math + kor + eng; strTotal = QString::number(res); strTotal = QString("strTotal: %1").arg(res); strTotal.sprintf("strTotal: %d", res); strTotal = QString("math: %1, kor: %2, eng: %3, total: %4") .arg(math) .arg(kor) .arg(eng) .arg(res); qDebug()
Qt/Classes
2017. 5. 1. 21:40