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

Make the qquickfontdialog support pixel size fonts in addition to point size

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.4
    • Quick: Dialogs
    • None

    Description

      If you set the font dialog's selectedFont property to a font that is using pixelSize rather than pointSize. Then the list view for the font size in the non-native font dialog will be -1 (which is the internal QFont representation for pixel size fonts).

      The following code can be used to verify the above information.

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Dialogs
      
      ApplicationWindow {
          id: window
      
          width: 640
          height: 480
          visible: true
      
          FontDialog {
              id: dialog
              selectedFont: Qt.font({family: "Sans Serif", pixelSize: 15})
          }
      
          Button {
              anchors.centerIn: parent
      
              text: "Click me!"
              onClicked: dialog.open()
          }
      }
      
      

      Another issue related to this, is that if you select the header text in the Text Editor example in qtdeclarative/examples/quickcontrols2/texteditor
      Then the font size will be incorrect, because the <h2> text will at some point be set to use a pixel size font. This might potentially be a bug, but I will need to investigate it further before I know for certain.

      Attachments

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

        Activity

          People

            hurlevent Oliver Eftevaag
            hurlevent Oliver Eftevaag
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes