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

QFontDialog doesn't accept initial font or font by setCurrentFont

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.14.2
    • None
    • Windows

    Description

      I tried to set the current font of QFontDialog using the initial font (Constructor) and the function setCurrentFont, both not working. The QFontDialog shows always on Window as initial font "MS Shell Dlg 2". The QFontDialog is broken.

       

      #if 0
       QFont courier("Courier New", 12, QFont::Normal);
       QFontDialog dialog(courier, this);
       dialog.setCurrentFont(courier);
       bool ok;
       QFont newFont = dialog.getFont(&ok, this);
       qDebug() << newFont;
      #endif
      
      #if 0
       QFont courier;
       courier.fromString("Courier New,12,-1,5,50,0,0,0,0,0,Standard");
       QFontDialog dialog(courier, this);
       dialog.setCurrentFont(courier);
       bool ok;
       QFont newFont = dialog.getFont(&ok, this);
       qDebug() << newFont;
      #endif
      
      #if 0
       QFont courier;
       courier.fromString("Courier New,12,-1,5,50,0,0,0,0,0,Standard");
       QFontDialog dialog(this);
       dialog.setCurrentFont(courier);
       bool ok;
       QFont newFont = dialog.getFont(&ok, this);
       qDebug() << newFont;
      #endif
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            happycodernext happycodernext
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes