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
){
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()
{
}
#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()
{
}
To copy to clipboard, switch view to plain text mode
Bookmarks