QString use in ComboBox model data presentation
Unsolved
QML and Qt Quick
-
I would like to use a QML QString for formatting the text that will be displayed for the model data in a ComboBox. QString has the C++ .arg() functionality which will give me better formatting than I can otherwise get.
Does anyone know if it is possible to use QString to format the data to be presented in a ComboBox.
I have tried to use it directly in the text: line in my ComboBox delegate, like "text: new QString("Cass Id: %1").arg(modelData.CassId, 2)", but I get no data out.
I've tried to write a function to call, but I can't get that to work either.
Any help would be greatly appreciated.
Regards,
Greg