Qt学习之路—containers(2)

August 7th, 2013 by JasonLe's Tech Leave a reply »

下面介绍QLinklist<T>

http://harmattan-dev.nokia.com/docs/library/html/qt4/qlinkedlist.html

QLinkedList stores a list of items. The default constructor creates an empty list. To insert items into the list, you can use operator<<():

 QLinkedList<QString> list;
 list << "one" << "two" << "three";
 // list: ["one", "two", "three"]

void QLinkedList::append ( const T & value )

Inserts value at the end of the list.

 QLinkedList<QString> list;
 list.append("one");
 list.append("two");
 list.append("three");
 // list: ["one", "two", "three"]