How convert Qt::Key to QString?
How convert Qt::Key to QString?
1) Check that it is in the range of characters and 2) create a string with QString::number(code)
Do you want to take:
and turn it into ";" or "Qt::Key_Semicolon"?Qt Code:
Qt::Key key = Qt::Key_Semicolon;To copy to clipboard, switch view to plain text mode
If you got the Qt::Key value in a QKeyEvent then QKeyEvent::text() may be useful.
Qt::Key key = Qt::Key_W;
qDebug() << QKeySequence(key).toString();
No longer necessary.
Bookmarks