Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Unknown macro: {alias}

Name

qinsertitem — insert item in a QComboBox

Syntax

qinsertitem combo index item

qinsertitem combo index icon item

Description

The qinsertitem command inserts items in a QComboBox.

Arguments

combobox

index

item

icon

Examples

Ex.1: qinsertitem

# Some files containing pixmaps
set fileopen_icon_file [file join $Geocap::geocapdir icons fileopen.xpm]

# Create icons
set fileopen_icon [qicon $fileopen_icon_file]

set w [qwidget ]
qsetwindowtitle "ABC Combo"
qvboxlayout {
	set c [qcombobox]
	qadditems { A B C }
	qinsertitem $c 1 INSERTED
	qinsertitem $c 2 $fileopen_icon FILEOPEN
}

qshow $w

The above example inserts two items, one includes an icon. Both are in a combobox.

  • No labels