Askar
23rd February 2011, 06:16
Dear friends,
I need Help on how to set default text to be displayed on combo box before selecting an item from it, i used the following code,
QComboBox cmb;
cmb.addinsertItem(-1,"Select text");
cmb.additem("abcdef");
cmb->setCurrentIndex(-1);
but the "Select Text" is not displayed on the combo box by defualt, instead it is displayed as one of the item in the combo box drop down list.....
can any one help me to solve this,
Thanks in advance,
I need Help on how to set default text to be displayed on combo box before selecting an item from it, i used the following code,
QComboBox cmb;
cmb.addinsertItem(-1,"Select text");
cmb.additem("abcdef");
cmb->setCurrentIndex(-1);
but the "Select Text" is not displayed on the combo box by defualt, instead it is displayed as one of the item in the combo box drop down list.....
can any one help me to solve this,
Thanks in advance,