TextFieldStyle QML Type | Qt Quick Controls 5.4

- Qt 5.4
- Qt Quick Controls
- QML Types
- TextFieldStyle QML Type
- Qt 5.4.2 Reference Documentation

# TextFieldStyle QML Type

Provides custom styling for TextField. More...

Import Statement: | import QtQuick.Controls.Styles 1.3
Since: | Qt 5.1

- List of all members, including inherited members

## Properties

- background : Component
- control : TextField
- font : font
- placeholderTextColor : color
- renderType : int
- selectedTextColor : color
- selectionColor : color
- textColor : color

## Detailed Description

Example:

    TextField {
        style: TextFieldStyle {
            textColor: "black"
            background: Rectangle {
                radius: 2
                implicitWidth: 100
                implicitHeight: 24
                border.color: "#333"
                border.width: 1
            }
        }
    }

## Property Documentation

background : Component

The background of the text field.

read-onlycontrol : TextField

The TextField this style is attached to.

font : font

The current font.

placeholderTextColor : color

The placeholder text color, used when the text field is empty.

This QML property was introduced in QtQuick.Controls.Styles 1.1.

renderType : int

Override the default rendering type for the control.

Supported render types are:

- Text.QtRendering
- Text.NativeRendering

The default value is platform dependent.

This QML property was introduced in QtQuick.Controls.Styles 1.1.

See also Text::renderType.

selectedTextColor : color

The highlighted text color, used in selections.

selectionColor : color

The text highlight color, used behind selections.

textColor : color

The text color.