What's the difference between QString[] and QStringList

Nixmd picture Nixmd · Aug 16, 2013 · Viewed 15.6k times · Source

What's the difference between an object of QStringList and an Array of QStrings? I mean it seems that both behave as an array.

Answer

Marco M. picture Marco M. · Aug 16, 2013

QStringList is a dynamic array, meaning that it can expand/shrink as you add more/remove strings to/from it.

QString array[10]; is a fixed size array of QString. You can't expand or shrink it.