qcombobox

How to get feedback from ComboBoxes created in a loop

How to get feedback from ComboBoxes created in a loop Question: I am trying to feed an unspecified number of comboboxes to a user. Once the user selects inputs for the combo boxes I want to be able to print out those combobox inputs after the submit button is clicked. Currently I can only print …

Total answers: 1

QComboBox adjust drop down width

QComboBox adjust drop down width Question: Not sure why I cant get it to work, so maybe one of you will be able to see my mistake… : combo_type = QComboBox() combo_type.setMaximumWidth(50) combo_type.addItems([“TEsst1111″,”TEsst11111111111111″,”TEsst1111111111111111111111111″]) combo_type.setStyleSheet(”’* QComboBox QAbstractItemView::item { min-width: 6000px; } ”’) The idea is so that widget in UI has 50 width but when drop …

Total answers: 3

How to set QComboBox to item from item's text in PyQt/PySide

How to set QComboBox to item from item's text in PyQt/PySide Question: Is it possible to set QComboBox to an item knowing only an item’s text value? I am trying to avoid looping through for i in range(myCombobox.count()) just to find an item’s index so it could be used to set the current index. Asked …

Total answers: 1

How to add items to a QComboBox in PyQt/PySide

How to add items to a QComboBox in PyQt/PySide Question: I need some help adding some items to a QComboBox. So I have two comboboxes, and one populates the other depending on the item selected. My question is that, using additem for new items, it works, but if I choose another option for the combobox, …

Total answers: 3

Getting all items of QComboBox – PyQt4 (Python)

Getting all items of QComboBox – PyQt4 (Python) Question: I have A LOT of QComboBoxes, and at a certain point, I need to fetch every item of a particular QComboBox to iterate through. Although I could just have a list of items that correspond to the items in the QComboBox, I’d rather get them straight …

Total answers: 2

How do you get the current text contents of a QComboBox?

How do you get the current text contents of a QComboBox? Question: Using pyqt4 and python 2.6, I am using a qcombobox to provide a list of options. I am having problems with using the selected option. I have been able to use a signal to trigger a method when the option is selected, but …

Total answers: 4