You can use the style hint property of QFont:
QFont font("Monospace");
font.setStyleHint(QFont::TypeWriter);
If the font cannot be found (which happens with Monospace on Windows), Qt’s font matching algorithm tries to find a font that matches the given style hint.