[Qt-interest] QComboBox with a 'no item'?

Timothy Reaves treaves at silverfieldstech.com
Sun Jun 6 02:06:12 CEST 2010


	I'm using a QComboBox backed by a model.  This forces the user to always have an item selected, once one is selected.   Initially, the index is set to -1, so no item is selected.  Once an item is selected, there is no way to select a blank item.  I could put a little button next to each combo box the clear the selection (setting the index to -1), but this seems a common issue.  Is there a way to do this with the model or the combo box itself?

	Thanks.



More information about the Qt-interest-old mailing list