#include <QApplication>
#include <QListWidget>
#include <QHBoxLayout>
#include <QListWidget>
int main(int argc, char** argv)
{
//QListWidget is a convenience class
//usefull to quickly show a list and you don't need to complicate your life with MV
// alternative for QList<QString>,
// is actually derived from QList<QString>
// and it implements some methods that might be usefull - example join
//add some items into the QStringList
//here i use the operator<<, but it has other methods like append... see the documentation
listOfStrings << "item 0" << "item 1" << "item 2";
//add the items from the QStringList
listWidget->addItems(listOfStrings);
layout->addWidget(listWidget);
w.show();
return a.exec();
}