PDA

View Full Version : QFontComboBox Delete font



romzxlat
29th October 2015, 02:44
I'm creating font selection and I'm using QFontComboBox. Is there any possibility to delete MS serif in QFontComboBox list?

TIA

Radek
29th October 2015, 06:58
QFontComboBox is a combo box. Therefore, removeItem() should remove an item from it. Number of fonts in the combo box should be provided by count(). You can traverse the combo box using indexing and search the unwanted fonts using, for example itemText().

romzxlat
4th November 2015, 01:49
if I delete the index "60" using removeItem(60). the next index will be delete because of changing of index. how can I fix that?

Caolan O'Domhnaill
6th November 2015, 07:44
if I delete the index "60" using removeItem(60). the next index will be delete because of changing of index. how can I fix that?

It's a zero-based index. Try 59.