KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
We have a simple piece of code in our application: void tAccessPoint::OnStateChanged(QAbstractSocket::SocketState state) { qDebug() << m_ID << " " << state; For reasons that aren't important here I was attempting to replace the use of qDebug so I used the code from this post C++ format macro / inline ostringstream . But I was surprised to find that when I do this state no longer appears as a text value but rather as a numeric value. qDebug() seems to know what the name of the enum value is rather than just the value. How does it do this, and can I do the same in my code?
Tags (comma-separated)
Save Edits
Cancel