Example of QList container in QT-C++
Main.cpp
#include<iostream>
#include<QList>
#include<QTextStream>
#include <algorithm>
using namespace std;
int main()
{
QList<QString> countries = {"USA", "India", "Mexico"};
cout<<"Size of the List :"<<countries.size()<<endl;
for(int i = 0; i<countries.size(); i++)
cout<<countries.at(i).toStdString();
cout<<endl;
return 0;
}
Project in QT Creator

Project file

Output of the program
