combobox添加元素,不带数据
def
init_combobox1(
self
):
for
i
in
range
(
len
(items_list)):
self
.combobox1.addItem(items_list[i])
self
.combobox1.setCurrentIndex(
-
1
)
def
on_combobox1_Activate(
self
, index):
print
(
self
.combobox1.count())
print
(
self
.combobox1.currentIndex())
print
(
self
.combobox1.currentText())
print
(
self
.combobox1.currentData())
print
(
self
.combobox1.itemData(
self
.combobox1.currentIndex()))
print
(
self
.combobox1.itemText(
self
.combobox1.currentIndex()))
print
(
self
.combobox1.itemText(index))