QListlist = {1, 2, 3, 4, 2, 5}; list.removeOne(2); // After execution, the list will be {1, 3, 4, 2, 5} // The first occurrence of value 2 is removed
QStringList list = {"hello", "world", "Qt", "is", "awesome"}; list.removeOne("is"); // After execution, the list will be {"hello", "world", "Qt", "awesome"} // The first occurrence of value "is" is removedPackage library: Qt Core Library