Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69878

[REG 5.11.0->5.11.1] QFontDialog stays on the initial font

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P1: Critical
    • Resolution: Done
    • 5.11.1
    • 5.12.0 Beta 1
    • QPA
    • 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
    • macOS
    • 9c839f95a20904ae66d962f24225dabf13f85266 (qt/qtbase/5.12)

    Description

      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();
      }
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-69878
          # Subject Branch Project Status CR V

          Activity

            People

              vestbo Tor Arne Vestbø
              chrono35 Philippe Dufresne
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes