I found a possible solution using the QFontMetrics class . Here is an example function to query if all characters in the current QLabel text are available:
bool charactersMissing(const QLabel& label) {
QFontMetrics metrics(label.font());
for (int i = 0; i < label.text().size(); ++i) {
if (!metrics.inFont(label.text().at(i))) {
return true;
}
}
return false;
}
Of course, displaying to a user who is absent will be good, but of course it needs to be done with a different font :)