Combo Box should be like Editable Combo Box but the Items should not be edited - how to change like this?
-
How can i change the look of my Combobox to be like a Editable Combo Box, but the Items in it should not be edited...??
Any Help...
![IMG]http://i.imgur.com/1IS5iOZ.png[/IMG](Combo Box)!
-
You could do something like in PySide , so you have to translate it into Qt -C++
I had the same situation and i overcome with the following code.
@
alphabets=["A","B","C","D","E","F","G"] #list of items to show
alphbets_cmbbx=QtGui.QComboBox(self)
alphbets_cmbbx.setEditable(True)
alphbets_cmbbx.addItems(alphabets) # add items list here
alphbets_cmbbx.setInsertPolicy(QtGui.QComboBox.NoInsert)
alphbets_cmbbx.setCurrentIndex(-1)
@
#add your custom Validator using QRegExpValidator to it for accepting only letters
#add your signalsWith this one can enter different letters which will not be saved and they can also pick one from the list.