PDA

View Full Version : QComboBox::insertSeparator(int index) is not working



osiris81
20th February 2009, 12:06
Hi,

I've tried the insertSeparator method on the QComboBox but it seems not to work (it just does not insert the separator at all), anyone an idea?

Qt 4.4.3
Windows XP

Code:

#include "comboboxtest.h"

ComboBoxTest::ComboBoxTest(QWidget *parent, Qt::WFlags flags)
: QMainWindow(parent, flags)
{
ui.setupUi(this);

ui.m_comboBox->insertItem(0, "item1");
ui.m_comboBox->insertItem(1, "item2");
ui.m_comboBox->insertItem(2, "item3");
ui.m_comboBox->insertItem(3, "item4");

ui.m_comboBox->insertSeparator(2);
}

ComboBoxTest::~ComboBoxTest()
{

}

seneca
20th February 2009, 13:41
http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=237585

philw
14th July 2011, 18:43
FWIW ... Using Qt 4.6.3, QComboBox separators -- using the QComboBox::insertSeparator(int index) method -- ARE working for me on Windows (XP), but they aren't showing up on Solaris.

(BTW, unfortunately, the URL provided in the prior response is no longer valid).