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

set Current font on a QFontDialog "locks" selectedFont() and currentFont() to this value when DontUseNativeDialog is set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.13.1
    • GUI: Text handling
    • None
    • Linux/X11, macOS

    Description

      Seen on MacOS and Linux. Just add these line on a new qt widget application to check it.

      MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent)
          , ui(new Ui::MainWindow)
      {
          ui->setupUi(this);    //QFontDialog fontDialog; //OK
          QFontDialog fontDialog(QFont("Ani"));    
          fontDialog.setOption(QFontDialog::DontUseNativeDialog);    
      
          if (fontDialog.exec()) // <- select another font than Ani
          {
              qDebug() << fontDialog.selectedFont(); //will return Ani anyway
          }
      }
      

      seems to be related to this oneĀ https://bugreports.qt.io/browse/QTBUG-35857

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            kamui kamui
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes