TextFieldPopup

Search for usage in LXR

TextFieldPopup Class Reference
Inheritance diagram for TextFieldPopup:

Properties

alias activeFocusOnPress
 
alias closePolicy
 
alias color
 
alias content
 
alias inputMethodHints
 
int minimumHeight
 
int minimumWidth
 
alias placeholderText
 
alias popup
 
alias popupVisible
 
int position
 
alias textField
 
alias verticalAlignment
 
alias wrapMode
 

Signals

void accepted ()
 
void cleared ()
 
void closed ()
 
void opened ()
 

Public Member Functions

void clear ()
 
void close ()
 
void forceActiveFocus ()
 
void open ()
 
- Public Member Functions inherited from QtQuick.Controls.AbstractButton
 canceled ()
 
 clicked ()
 
 doubleClicked ()
 
 pressAndHold ()
 
 pressed ()
 
 released ()
 
void toggle ()
 
 toggled ()
 

Detailed Description

A TextField control with an attached popup surface.

This control groups a text field box and a popup page together - the popup surface can be used to display any data content that might be related to the text field input.

The text field control is handled by a QQC2 TextField control, which is exposed as textField, and the popup surface is hanlded by a QQC2 Popup control, also exposed as an alias popup. With those alias you can fine tune the properties of said controls.

See also
textField
popup
Maui.Page
{
anchors.fill: parent
Maui.Controls.showCSD: true
Maui.Theme.colorSet: Maui.Theme.Window
footBar.middleContent: Maui.TextFieldPopup
{
position: ToolBar.Footer
Layout.fillWidth: true
Layout.maximumWidth: 500
Layout.alignment: Qt.AlignHCenter
placeholderText: "Search for Something."
Maui.Holder
{
anchors.fill: parent
visible: true
title: "Something Here"
body: "List whatever in here."
emoji: "edit-find"
}
}
}
int position
The position of the control.
alias placeholderText
The text to be used as the placeholder in the text field box.

You can find a more complete example at this link.

Definition at line 69 of file TextFieldPopup.qml.

Property Documentation

◆ activeFocusOnPress

alias TextFieldPopup::activeFocusOnPress
read

Whether the text field box gets focused on pressed.

By default this is set to true

Definition at line 139 of file TextFieldPopup.qml.

◆ closePolicy

alias TextFieldPopup::closePolicy
read

The Popup close policy.

by default this is set to Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent

Definition at line 114 of file TextFieldPopup.qml.

◆ color

alias TextFieldPopup::color
read

The color fo the text in the text field.

Definition at line 150 of file TextFieldPopup.qml.

◆ content

alias TextFieldPopup::content
read

The children elements are placed inside the popup surface.

Remarks
This is the default property

The elements have to be positioned manually. The popup surface is open once the text field bar is focused.

Definition at line 88 of file TextFieldPopup.qml.

◆ inputMethodHints

alias TextFieldPopup::inputMethodHints
read

The input method hints for the text field.

refer to the Qt TextField documentation for further information.

Definition at line 133 of file TextFieldPopup.qml.

◆ minimumHeight

int TextFieldPopup::minimumHeight
read

Definition at line 76 of file TextFieldPopup.qml.

◆ minimumWidth

int TextFieldPopup::minimumWidth
read

Definition at line 74 of file TextFieldPopup.qml.

◆ placeholderText

alias TextFieldPopup::placeholderText
read

The text to be used as the placeholder in the text field box.

Definition at line 127 of file TextFieldPopup.qml.

◆ popup

alias TextFieldPopup::popup
read

An alias to the QQC2 control handling the popup surface.

An alias to the TextField control handling the text field box.

Remarks
This property is read-only

Exposed to access its properties. See Qt documentation on the Popup control.

Exposed to access its properties. See Qt documentation on the TextField control.

Definition at line 95 of file TextFieldPopup.qml.

◆ popupVisible

alias TextFieldPopup::popupVisible
read

Whether the popup surface is currently visible.

Remarks
This property is read-only

Definition at line 108 of file TextFieldPopup.qml.

◆ position

int TextFieldPopup::position
read

The position of the control.

This will make the popup go in either of the picked position: top or bottom. By default this is set to ToolBar.Header Possible values are:

  • ToolBar.Header
  • ToolBar.Footer

Definition at line 122 of file TextFieldPopup.qml.

◆ textField

alias TextFieldPopup::textField
read
Remarks
This property is read-only

Definition at line 102 of file TextFieldPopup.qml.

◆ verticalAlignment

alias TextFieldPopup::verticalAlignment
read

The vertical alignment of the text in the text field box.

By default his is set to Qt.AlignVCenter

Definition at line 156 of file TextFieldPopup.qml.

◆ wrapMode

alias TextFieldPopup::wrapMode
read

The wrap mode for the text in the text field box.

By default this is set to Text.NoWrap.

Definition at line 145 of file TextFieldPopup.qml.

Member Function Documentation

◆ accepted

void TextFieldPopup::accepted ( )
signal

Emitted when the text entered has been accepted, either by pressing Enter, or manually accepted.

◆ clear()

void TextFieldPopup::clear ( )

Forces to clear the text in the text field box.

◆ cleared

void TextFieldPopup::cleared ( )
signal

Emitted when the text in the text field box has been cleared using the clear button or clear action.

◆ close()

void TextFieldPopup::close ( )

Forces to close the popup surface.

◆ closed

void TextFieldPopup::closed ( )
signal

Emitted when the popup surfaced has been dismissed.

◆ forceActiveFocus()

void TextFieldPopup::forceActiveFocus ( )

Force the focus to go on the text field box and open up the popup surface.

◆ open()

void TextFieldPopup::open ( )

Forces to open the popup surface.

◆ opened

void TextFieldPopup::opened ( )
signal

Emitted when the popup surface has been activated and is visible.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.