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

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.11.1
    • Fix Version/s: 5.12.0 Beta 1
    • Component/s: QPA: Other
    • Labels:
      None
    • Environment:
      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
    • Platform/s:
      macOS
    • Commits:
      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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                vestbo Tor Arne Vestbø
                Reporter:
                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