自学QT之qFind的用法
#include <QCoreApplication> #include <QStringList> #include <QDebug> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QList<QString> list; list<<"qwq"<<"ewrw"<<"e"; QList<QString>::const_iterator iter=qFind(list.begin(),list.end(),"e"); if(iter!=list.end()) { qDebug()<<*iter; } else { qDebug()<<"not fond"; } return a.exec(); } 转载于:https://my.oschina.net/u/2505464/blog/542340 来源:51CTO 作者: chizhou4731 链接:https://blog.csdn.net/chizhou4731/article/details/100732241