I need to pass a QChar to a function that expects a wchar_t
:
void myFunc(wchar_t wch);
Trying to just pass the QChar
fails with an error:
error: C2664: 'myFunc' : cannot convert parameter 1 from 'QChar' to 'wchar_t'
Found the answer even while I was asking the question, I needed to use QChar::unicode().
wchar_t wch = qch.unicode();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With