Created
January 20, 2013 20:29
-
-
Save lamprosg/4581482 to your computer and use it in GitHub Desktop.
Qt - qSort Algorithm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int main() | |
| { | |
| //Let's say we have a listof integers | |
| QList<int> List; | |
| //insert some numbers | |
| List << 2 << 3 << 1 << 0; //Yes you could use List.append | |
| qSort(List) | |
| foreach (int i, List) | |
| { | |
| qDebug() << i; | |
| } | |
| //The above will output 0,1,2,3 | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
QLInkedList is implemented the same as QList