QFontCombox not returning the font family
Unsolved
Qt for Python
-
How do I make QFontComboBox to return a list of font family only but not the complete dialog pop-up with font style, point size and other style techniques(kerning, strikeout,underline). I'm doing something like this:
QFont Vizkit3DWidget::getFont()const { QFontComboBox *dialog = new QFontComboBox(); QFont font=dialog->currentFont(); return font.family(), } void Vizkit3DWidget::setFont(QFont font) { QFontComboBox *dialog = new QFontComboBox(); dialog->setCurrentFont(font); }
-
Hi and welcome to devnet,
If you want a list of the font families then why not just use QFontDatabase::families ?
-
The code you show above does not much.
You should explain exactly what you are trying to achieve because you are talking about a dialog yet create a combo box that you don't even show.