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

Different point size for the font created using QFont class and returned by QFontDialog

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.4
    • 4.7.1
    • GUI: Font handling
    • RelTestRound2
    • fcfc19878a0a1a48194a786bba64da11606077d2

    Description

      setFont() test case from tests/auto/qfontdialog test case is failed.
      00:48:03.337 [QTestLib] FAIL! : tst_QFontDialog::setFont() Compared values are not the same Actual (QFontInfo(f2).pointSize()): 6 Expected (QFontInfo(f1).pointSize()): -1 Loc: [K:\sf\mw\qt\tests\auto\qfontdialog\tst_qfontdialog.cpp(162)]

          QString fontName = "Arial";
          int fontSize = 24;
      
          QFont f1(fontName, fontSize);
          f1.setPixelSize(QFontInfo(f1).pixelSize());
          QTimer::singleShot(2000, this, SLOT(postKeyReturn()));
          QFont f2 = QFontDialog::getFont(&ok, f1);
          QCOMPARE(QFontInfo(f2).pointSize(), QFontInfo(f1).pointSize());
      

      Point size is different for the same font but created in different manner: one by QFont object and second by QFontDialog.
      The QFont object returned by QFontDialog also should return -1 for the font with specified pixel size but returned 6.
      It is reproduced only on Symbian devices. It is not reproduced on Windows and emulator.

      Attachments

        Issue Links

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

          Activity

            People

              portale Alessandro Portale
              vasyura Oleh Vasyura
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes