Qt Creator Documentation 2.8.0

Contents

QML AlphaField Element

A text box with label that accepts keyboard input when the input box has focus. More...

Properties

Detailed Description

The AlphaField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a keyboard will slide out to allow a user to input text.

Here is a simple AlphaField:

 import QtQuick 1.1
 import "components"

 AlphaField {
     id: alphabetic_field1
     fieldSpacing: 4
     keyTextColor: "#ffffff"
     keyTextBold: false
     keyTextFontSize: 14
     keyboardAnimationSpeed: 100
     inputText: ""
     width: 180
     inputColor: "#ffffff"
     inputFontFamily: "Arial"
     inputFontPixelSize: 14
     labelText: "Label"
     labelColor: "#000000"
     labelFontFamily: "Arial"
     labelFontPixelSize: 14

     onInputTextChanged: {
         console.debug(inputText);
     }
 }

Property Documentation

fieldSpacing : int

The space in pixels between the label and the input box.


inputColor : color

The color background for the input box.


inputFontBold : bool

Determines if the input font should be bold.


inputFontFamily : string

The font family that will be used for the input box.


inputFontItalic : bool

Determines if the input font should be italic.


inputFontPixelSize : int

The font pixel size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.


inputFontPointSize : int

The font point size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.


inputFontStrikeout : bool

Determines if the input font should be strikeout.


inputFontUnderline : bool

Determines if the input font should be underlined.


inputText : string

The text that will be displayed for the input box.


keyBoardAnimationSpeed : int

Animation speed for the keyboard to scroll up into position.


keyHeight : int

Height of the keyboard button.


keyTextColor : string

The color of the text that is on the keyboard button.


keyWidth : int

Width of the keyboard button.


keyboardBackGroundImage : url

Source Image for the keyboard area background.


labelColor : color

The text color for the label.


labelFontBold : bool

Determines if the label font should be bold.


labelFontFamily : string

The font family that will be used for the label.


labelFontItalic : bool

Determines if the label font should be italic.


labelFontPixelSize : int

The font pixel size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.


labelFontPointSize : int

The font point size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.


labelFontStrikeout : bool

Determines if the label font should be strikeout.


labelFontUnderline : bool

Determines if the label font should be underlined.


labelText : string

The text that will be displayed for the label.


normalKeyIcon : url

Source Image for the keyboard button up state.


pressedKeyIcon : url

Source Image for the keyboard button down state.


width : int

The width of the control in pixels.