Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个用户选择的 QFont:
QFont font = QFontDialog::getFont(&ok, prevFont, this);
我怎么知道它是否是衬线字体?
这行得通吗?
bool isSansSerrif = (font.styleHint() & QFont::SansSerif); bool isSerrif = (font.styleHint() & QFont::Serif);