bool QStringList::contains(const QString& str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
#includeThe `contains` function is part of the Qt Core library, which is included in the Qt Framework package.int main() { // create a QStringList QStringList fruits; fruits << "apple" << "banana" << "cherry"; // check if "banana" is in the list bool is_banana = fruits.contains("banana"); // returns true // check if "Orange" is in the list (with case insensitive comparison) bool is_orange = fruits.contains("Orange", Qt::CaseInsensitive); // returns false return 0; }