2018年4月2日

TextInput

モジュール

QtQuick 2.9

クラス継承

QQuickTextInput → QQuickImplicitSizeItem (internal) → QQuickItemQObject

プロパティー

acceptableInput: bool = true readonly
activeFocusOnPress: bool = true
autoScroll: bool = true
bottomPadding: real = 0
canPaste: bool = true readonly
canUndo: bool = false readonly
canRedo: bool = false readonly
color: color = #ff000000
contentHeight: real = プラットフォームデフォルト readonly
contentWidth: real = 0 readonly
cursorDelegate: Component = null
cursorPosition: int = 0
cursorRectangle: rect = Qt.rect(0, 0, 1, プラットフォームデフォルト) readonly
cursorVisible: bool = false
displayText: string = "" readonly
echoMode: EchoMode = TextInput.Normal
effectiveHorizontalAlignment: HAlignment = TextInput.AlignLeft readonly
font: font = プラットフォームデフォルト final
horizontalAlignment: HAlignment = TextInput.AlignLeft
inputMask: string = ""
inputMethodComposing: bool = false readonly
inputMethodHints: Qt::InputMethodHints = 0
leftPadding: real = 0
length: int = 0 readonly
maximumLength: int = 32767
mouseSelectionMode: SelectionMode = TextInput.SelectCharacters
overwriteMode: bool = false
padding: real = 0
passwordCharacter: string = "•"
passwordMaskDelay: int = 0
persistentSelection: bool = false
preeditText: string = "" readonly
readOnly: bool = false
renderType: RenderType = TextInput.QtRendering
rightPadding: real = 0
selectByMouse: bool = false
selectedText: string = "" readonly
selectedTextColor: color = #ffffffff
selectionColor: color = #ff000080
selectionEnd: int = 0 readonly
selectionStart: int = 0 readonly
text: string = ""
topPadding: real = 0
validator: QValidator* = null
verticalAlignment: VAlignment = TextInput.AlignTop
wrapMode: WrapMode = TextInput.NoWrap

implicitWidth: real = 0 readonly inherited override
implicitHeight: real = プラットフォームデフォルト readonly inherited override

シグナル

accepted()
editingFinished()
textEdited()
acceptableInputChanged()
activeFocusOnPressChanged(bool activeFocusOnPress)
autoScrollChanged(bool autoScroll)
bottomPaddingChanged()
canPasteChanged()
canRedoChanged()
canUndoChanged()
colorChanged()
contentSizeChanged()
cursorDelegateChanged(
cursorPositionChanged()
cursorRectangleChanged()
cursorVisibleChanged(bool isCursorVisible)
displayTextChanged()
echoModeChanged(TextInput::EchoMode echoMode)
effectiveHorizontalAlignmentChanged()
fontChanged(QFont font)
horizontalAlignmentChanged(TextInput::HAlignment alignment)
inputMaskChanged(QString inputMask)
inputMethodComposingChanged()
inputMethodHintsChanged()
leftPaddingChanged()
maximumLengthChanged(int maximumLength)
mouseSelectionModeChanged(TextInput::SelectionMode mode)
overwriteModeChanged(bool overwriteMode)
paddingChanged()
passwordCharacterChanged()
passwordMaskDelayChanged(int delay)
persistentSelectionChanged()
preeditTextChanged()
readOnlyChanged(bool isReadOnly)
renderTypeChanged()
rightPaddingChanged()
selectByMouseChanged(bool selectByMouse)
selectedTextChanged()
selectedTextColorChanged()
selectionColorChanged()
selectionEndChanged()
selectionStartChanged()
textChanged()
topPaddingChanged()
validatorChanged()
verticalAlignmentChanged(TextInput::VAlignment alignment)
wrapModeChanged()

implicitWidthChanged() inherited
void implicitHeightChanged() inherited

メソッド

QString getText(int start, int end)
QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument)
void moveCursorSelection(int pos, SelectionMode mode = TextInput.SelectCharacters)
int positionAt(real x, real y, CursorPosition position = TextInput.CursorBetweenCharacters);
QRectF positionToRectangle(int pos)

スロット

void clear()
void copy()
void cut()
void deselect()
void ensureVisible(int position)
bool isRightToLeft(int start, int end)
void insert(int position, string text)
void paste()
void redo()
void remove(int start, int end)
void select(int start, int end)
void selectAll()
void selectWord()
void undo()

列挙

EchoMode
    Normal
    NoEcho
    Password
    PasswordEchoOnEdit
HAlignment
    AlignLeft
    AlignRight
    AlignHCenter
VAlignment
    AlignTop
    AlignBottom
    AlignVCenter
WrapMode
    NoWrap
    WordWrap
    WrapAnywhere
    WrapAtWordBoundaryOrAnywhere
    Wrap
SelectionMode
    SelectCharacters
    SelectWords
CursorPosition
    CursorBetweenCharacters
    CursorOnCharacter
RenderType
    QtRendering
    NativeRendering

説明


プロパティーの説明

acceptableInput: bool

activeFocusOnPress: bool

autoScroll: bool

bottomPadding: real

canPaste: bool

canUndo: bool

canRedo: bool

color: color

contentHeight: real

contentWidth: real

cursorDelegate: Component

cursorPosition: int

cursorRectangle: rect

cursorVisible: bool

displayText: string

echoMode: EchoMode

effectiveHorizontalAlignment: HAlignment

font: font

font を参照。

horizontalAlignment: HAlignment

inputMask: string

inputMethodComposing: bool

inputMethodHints: Qt::InputMethodHints

leftPadding: real

length: int

maximumLength: int

mouseSelectionMode: SelectionMode

overwriteMode: bool

padding: real

passwordCharacter: string

passwordMaskDelay: int

persistentSelection: bool

preeditText: string

readOnly: bool

renderType: RenderType

rightPadding: real

selectByMouse: bool

selectedText: string

selectedTextColor: colo

selectionColor: color

selectionEnd: int

selectionStart: int

text: string

topPadding: real

validator: QValidator*

verticalAlignment: VAlignment

wrapMode: WrapMode

シグナルの説明

accepted()

editingFinished()

textEdited()

メソッドの説明

QString getText(int start, int end)

QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument)

void moveCursorSelection(int pos, SelectionMode mode = TextInput.SelectCharacters)

int positionAt(real x, real y, CursorPosition position = TextInput.CursorBetweenCharacters)

QRectF positionToRectangle(int pos)

スロットの説明

void clear()

void copy()

void cut()

void deselect()

void ensureVisible(int position)

bool isRightToLeft(int start, int end)

void insert(int position, string text)

void paste()

void redo()

void remove(int start, int end)

void select(int start, int end)

void selectAll()

void selectWord()

void undo()

問題


参考情報