- 
    
Bug
 - 
    Resolution: Done
 - 
    
P1: Critical
 - 
    5.11.1
 - 
    None
 - 
    Qt Creator 4.7.0
Base sur Qt 5.11.1 (Clang 8.0 (Apple), 64 bit)
Built on Jul 17 2018 04:23:31
From revision dedbb40f57 
- 
        
 - 
        9c839f95a20904ae66d962f24225dabf13f85266 (qt/qtbase/5.12)
 
Tested with version 5.10, the returned value corresponds well with the chosen font.
Just test this code with Qt 5.10.1 clang 64 bit -> OK
with Qt 5.11.1 clang 64 bit ->Fails
#include <QApplication> #include <QTextEdit> #include <QFontDialog> int main(int argv, char **args) { QApplication app(argv, args); QTextEdit textEdit; bool ok; QFont font = QFontDialog::getFont(&ok, QFont("Times", 12), &textEdit); if (ok) { // font is set to the font the user selected textEdit.append("ok"); } else { // the user canceled the dialog; font is set to the initial // value, in this case Times, 12. textEdit.append("false"); } textEdit.append(font.family() + ", " + QString::number(font.pointSizeF())); textEdit.show(); return app.exec(); }
- is duplicated by
 - 
                    
QTBUG-70610 QFontDialog::getFont(...) always returns default font
-         
     - Closed
 
 -