static void moneyFunc(sqlite3_context *context, int argc, sqlite3_value **argv)
{
int sum = sqlite3_value_int(argv[0]);
int full = sum / 100;
int dec = sum % 100;
QString resultStr = QString(QObject::trUtf8("0,00"));
if (dec == 0){
resultStr = QString(QObject::tr("%1,00")).arg(full);
} else if (dec > 0 && dec < 10){
resultStr = QString(QObject::tr("%1,0%2")).arg(full).arg(dec);
} else if (dec >= 10 && dec <= 99){
resultStr = QString(QObject::tr("%1,%2")).arg(full).arg(dec);
}
sqlite3_result_text(context, resultStr.toAscii().data(), resultStr.size(), 0);
}
спасибо