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

QFontDialog::getFont() gets default/preset value for the font style list.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 4.8.0
    • None
    • Test environment: Ubuntu 11.10 + Qt4.8.0

    Description

      Use case:
      Define the intial font and launch the QFontDialog via QFontDialog::getFont():

      QFont font("DejaVu Sans Mono");
      font.setWeight(QFont::Normal);
      font.setPointSize(12);
      bool ok;
      QFontDialog::getFont(&ok, font, this);

      If the QFont::Normal is not found for the font 'DejaVu Sans Mono' the Font style list selects the first item on the list. On Ubuntu 11.10 it is 'Bold'.

      --> this should be changed so that style which corresponds 'Normal' is selected instead of the first item. On Ubuntu 11.10 'Book' corresponds the QFont::Normal instead of 'Bold'.

      The attached example application demonstrates the use case.
      Test environment: Ubuntu 11.10 + Qt4.8.0.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes