Właśnie wstawiłem sobie widgeta ComboBox do mojego programiku, niestety mam problem z jego implementacją.
W pomocy qt creatora znalazłem metodę insertItems która służy do wstawienia elementów do listy combo.
Kod: Zaznacz cały
void QComboBox::insertItems ( int index, const QStringList & list )
Inserts the strings from the list into the combobox as separate items, starting at the index specified.
If the index is equal to or higher than the total number of items, the new items are appended to the list of existing items. If the index is zero or negative, the new items are prepended to the list of existing items.
Kod: Zaznacz cały
void MainWindow::ustawznak()
{
QStringList znaki;
znaki << " " << "_" << "-" << "|";
ui->comboBox->insertItems(1, znaki);
}