I have this on one class:
typedef void(*PERCENTAGE_CALLBACK)(float);
And I use it on functions like this one:
int API_GenerateLayerData(int layerIndex, QByteArray data, int dataSize, PERCENTAGE_CALLBACK callBack);
But the thing is that I can't pass a parameter with a void return type and accepts float as a parameter like this:
void updateFormattingProcess(float value)
{
emit ChangeCompose(int(value));
}
void someFunction()
{
//It says cannot convert from 'void' to 'PERCENTAGE_CALLBACK'
API_GenerateLayerData(1, data, count, updateFormattingProcess(x));
}