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

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.13.1
    • Fix Version/s: None
    • Component/s: GUI: Text handling
    • Labels:
      None
    • Platform/s:
      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

            Assignee:
            esabraha Eskil Abrahamsen Blomfeldt
            Reporter:
            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