Hi, I have a problem.

I have a mysql table of towns and I want those towns to be available in QComboBox.

Any idea how to do that?

Just for testing I did this:

Qt Code:
  1. kraj_combo = new QComboBox();
  2. list << tr("Kranj") << tr("Postojna") << tr("Ljubljana") << tr("Trzin") << tr("Maribor");
  3. kraj_combo->insertItems(0,list);
To copy to clipboard, switch view to plain text mode 

Now I need to change this as I said. Please help me.