Wiki Markup |
---|
{alias:qsetitemtext}
h2. Name
*qsetitemtext* — set text in combobox
h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}
*qsetitemtext* \[_qcombobox_] _index text_
{panel}
h2. Description
The *qsetitemtext* command sets the textual content of a [QComboBox] at the specified index position.
The index numbering starts at 0.
h2. Arguments
{indent}
h2. Examples
h3. Ex.1: Set combo item text
{anchor:Set combo item text}
{noformat:|borderWidth=1|bgColor=#eeeeee} |
Name
qsetitemtext — set text in combobox
Syntax
Panel |
---|
bgColor | #FFFFAA |
---|
borderWidth | 1 |
---|
borderStyle | solid |
---|
|
qsetitemtext [qcombobox] index text |
Description
The qsetitemtext command sets the textual content of a QComboBox at the specified index position.
The index numbering starts at 0.
Arguments
Examples
Ex.1: Set combo item text
Anchor |
---|
| Set combo item text |
---|
| Set combo item text |
---|
|
No Format |
---|
bgColor | #eeeeee |
---|
borderWidth | 1 |
---|
|
# Create window
set widget [qwidget ]
set layout [qvboxlayout $widget]
# Create combobox
set combo [qcombobox ]
qaddwidget $layout
# Insert an item, then replace this item
qinsertitem $combo 0 "An item"
qsetitemtext $combo 0 "Modified item"
qshow $widget
{noformat}
{pagebreak} |