The value is a bit-wise combination of flags or Qt.ImhNone if no hints are set. Provides hints to the input method about the expected content of the text edit and how it should operate. The text will be altered to optimize legibility on the target device, but since the metrics will depend on the target size of the text, the positions of glyphs, line breaks, and other typographical detail will not scale, meaning that a text layout may look different on devices with different pixel densities. But since the horizontal metrics of the glyphs are unhinted, the text's layout will be scalable to higher density devices (such as printers) without impacting details such as line breaks.įont.PreferFullHinting - If possible, render text with hinting in both horizontal and vertical directions. The text will appear crisper on displays where the density is too low to give an accurate rendering of the glyphs. when printing.įont.PreferVerticalHinting - If possible, render text with no horizontal hinting, but align glyphs to the pixel grid in the vertical direction. The text layout will be typographically accurate, using the same metrics as are used e.g. Note: This property only has an effect when used together with render type TextEdit.NativeRendering.įont.PreferDefaultHinting - Use the default hinting level for the target platform.įont.PreferNoHinting - If possible, render text without hinting the outlines of the glyphs. You can translate between cursor positions (characters from the start of the document) and pixel points using positionAt() and positionToRectangle().
using SmoothedAnimation), might have a visible scrollbar, or a scrollbar that fades in to show location, etc.Ĭlipboard support is provided by the cut(), copy(), and paste() functions, and the selection can be handled in a traditional "mouse" mechanism by setting selectByMouse, or handled completely from QML by manipulating selectionStart and selectionEnd, or using selectAll() or selectWord(). ensureVisible( cursorRectangle)Ī particular look-and-feel might use smooth scrolling (eg. paintedHeight clip: true function ensureVisible(r)Įlse if ( contentY + height <= r. The TextEdit item displays a block of editable, formatted text. rectangle positionToRectangle( position).moveCursorSelection(int position, SelectionMode mode).string getFormattedText(int start, int end).effectiveHorizontalAlignment : enumeration.List of all members, including inherited members.