码迷,mamicode.com
首页 > 其他好文 > 详细

QList

时间:2016-12-17 20:22:41      阅读:339      评论:0      收藏:0      [点我收藏+]

标签:append   next   rem   argc   i++   argv   return   end   pen   

#include <QCoreApplication>
#include<QList>
#include<QDebug>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    QList<int> List;
    for(int i = 0; i < 10; i++)
    {
        List.append(i);
    }


    QMutableListIterator<int> Iter(List);
    while(Iter.hasNext())
    {
        int i  = Iter.next();
        if(i == 5)
        {
            Iter.remove();
        }
    }
    Iter.toFront();
    while(Iter.hasNext())
    {
        qDebug() << Iter.next();
    }
    return a.exec();
}

  

QList

标签:append   next   rem   argc   i++   argv   return   end   pen   

原文地址:http://www.cnblogs.com/my-cat/p/6192880.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!