Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to convert pointer of qint8 to qstring ?
dabla24 last edited by
I need to get the string for value of qint8 which is stored in pointer?
// returns qint8*
I tried with
@QString volString = QString("0x%1").arg(this->_vol,0,16);@
@QString volString = QString::number(this->_vol);@
but I get every time no matching function
if _vol is a function you need to call it ( () ), and if it returns a pointer you need to dereference it ( * ). You don't need to type this-> every time. That's a given.
//assuming _vol is a member function:
QString volString = QString::number(*_vol());
//and if it's just a plain old data member:
QString volString = QString::number(*_vol);