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

QFontDialog doesn't accept initial font or font by setCurrentFont

XMLWordPrintable

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

      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
      

        1. untitled1.zip
          5 kB
          happycodernext
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes