Hanny
Hanny

Reputation: 85

How to insert item which type is QString to a ComboBox in Qt?

I have an item which type is QString:

for example: QString name="Name"

the question is: How can I put this name variable into a combobox?

I've read the Qt 4.6.2 docs but still cant figure out how to do that. Please dont refer me back to that Qt 4.6.2 docs again..

Upvotes: 2

Views: 7096

Answers (1)

mtvec
mtvec

Reputation: 18326

I don't see the problem with the docs. Just do

myComboBox->addItem(myString);

Upvotes: 5

Related Questions