Wiki Markup |
---|
{alias:qlineedit} |
Name
qlineedit — one line text editor
...
The contents of the text field may be set using the qsettext command. Use qclear to clear the field. To retrieve the text use qtext.
Arguments
cmds
One or more commands to be performed when the text changes. The text contained in the QLineEdit is appended before evaluation. The commands must be a string or a list which adheres to Tcl's syntax. For such, a string may be either a single word or several words grouped as one string using quotes. A list is delimited by the '{' and '}' characters.
Examples
Ex.1: QLineEdit
Anchor | ||||
---|---|---|---|---|
|
No Format | ||||
---|---|---|---|---|
| ||||
# Callback for lineedit
proc do_something { text } {
}
set w [qwidget ]
qsetwindowtitle QLineEdit
qvboxlayout {
qlineedit
qsettext Hello
# Calls 'do_something' whenever a change takes place
# The text as appended to the callback expression
qlineedit do_something
}
qshow $w
|
...