Well, here is my test code:
tmpOrder.iMerchandizeID=1;
tmpOrder.iMerchandizeQuantity=25;
tmpOrder.rMerchandizePrice=4.00;
tmpOrder.rSubtotal=tmpOrder.iMerchandizeQuantity*tmpOrder.rMerchandizePrice;
tmpOrder.
strMerchandizeName=QString("Testni Artikel");
tmpOrder.
strDisplayString=QString::number(tmpOrder.
iMerchandizeID)+strMerchandizeSpaceDelimiter
+\
QString(tmpOrder.
strMerchandizeName)+strMerchandizeDelimiter
+\
QString::number(tmpOrder.
rMerchandizePrice,
'f', iMerchandizePricePrecision
)+strMerchandizeSpaceDelimiter
+\
QString::number(tmpOrder.
iMerchandizeQuantity)+strMerchandizeSpaceDelimiter
+\
QString::number(tmpOrder.
rSubtotal,
'f', iMerchandizePricePrecision
);
tmpOrder.iMerchandizeID=1;
tmpOrder.iMerchandizeQuantity=25;
tmpOrder.rMerchandizePrice=4.00;
tmpOrder.rSubtotal=tmpOrder.iMerchandizeQuantity*tmpOrder.rMerchandizePrice;
tmpOrder.strMerchandizeName=QString("Testni Artikel");
tmpOrder.strDisplayString=QString::number(tmpOrder.iMerchandizeID)+strMerchandizeSpaceDelimiter+\
QString(tmpOrder.strMerchandizeName)+strMerchandizeDelimiter+\
QString::number(tmpOrder.rMerchandizePrice, 'f', iMerchandizePricePrecision)+strMerchandizeSpaceDelimiter+\
QString::number(tmpOrder.iMerchandizeQuantity)+strMerchandizeSpaceDelimiter+\
QString::number(tmpOrder.rSubtotal, 'f', iMerchandizePricePrecision);
To copy to clipboard, switch view to plain text mode
Now the float values (price per unit and subtotal) are ok, but as you can see I do not use .arg function.
Bookmarks