Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.14.2
-
None
Description
I tried to set the current font of QFontDialog using the initial font (Constructor) and the function setCurrentFont, both not working. The QFontDialog shows always on Window as initial font "MS Shell Dlg 2". The QFontDialog is broken.
#if 0 QFont courier("Courier New", 12, QFont::Normal); QFontDialog dialog(courier, this); dialog.setCurrentFont(courier); bool ok; QFont newFont = dialog.getFont(&ok, this); qDebug() << newFont; #endif #if 0 QFont courier; courier.fromString("Courier New,12,-1,5,50,0,0,0,0,0,Standard"); QFontDialog dialog(courier, this); dialog.setCurrentFont(courier); bool ok; QFont newFont = dialog.getFont(&ok, this); qDebug() << newFont; #endif #if 0 QFont courier; courier.fromString("Courier New,12,-1,5,50,0,0,0,0,0,Standard"); QFontDialog dialog(this); dialog.setCurrentFont(courier); bool ok; QFont newFont = dialog.getFont(&ok, this); qDebug() << newFont; #endif