You should read this: http://doc.trolltech.com/4.2/designe...component.html (especially the part about single inheritance approach).
You should read this: http://doc.trolltech.com/4.2/designe...component.html (especially the part about single inheritance approach).
So my code would look like this:
vector<string> names;
size_t i;
combo_box::combo_box: (QWidget *parent) : QDialog(parent)
{
ui.setupUi(this);
for (i = 0; i 1= names.size(); ++i)
{
ui.name_combo->addItem(names[i]);
}
}
Will STL strings work or is there a conversion to QtString I will need to make?
Yes.
You have to convert std::string to QString like this:
Make sure that Qt was compiled with STL support (AFAIR it's enabled by default, so just check if your program compiles).Qt Code:
To copy to clipboard, switch view to plain text mode
pkirk25 (16th November 2006)
Bookmarks