Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Want to know difference between the member functions of QStringList
Phadnis last edited by A Former User
what is the difference between QStringList::QStringList(const QList<QString> &other) and QStringList &QStringList::operator=(const QList<QString> &other)
First one builds the Qstringlist while creating QStringList object itself from the list QList values. It is like copy constructor. Here there no two QStringList Objects exist here.
In the second case it uses operator overloading to copy contents of One StringList to Other StringList. Here there are two QStringList objects here. It is copying from one QStringList to Other QStringList object. It is object copy.
VRonin last edited by