Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4
-
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.