 Hey everybody, it's Brian, and welcome to the 37th Qt tutorial with C++ and GUI programming. Today, we're going to continue our conversation about the Qlist. So we'll just go new, console application, and let's say list again, and let's just throw this out in the usual location here. All right, and let's just throw our includes, and we're going to include QDebug so we can print some things out here. And once again, we're just going to very quickly, you can see Qlist, create a list item here, with ints, call it list, and this should be, this should all be reviewed for you at this point. I will say less than 10, and I, plus plus, all right, and we're just going to say list, if I spelled it right, list.append, and I. So we're just going to fill our list here, and we're going to do something a little different this tutorial. You already know how to fill things and remove things. So we're going to talk about how to navigate through the list a little bit. Well, there's this thing called a QlistIterator. I think I'm pronouncing that right. Somebody can correct me if I'm wrong. And there it is, QlistIterator. And you give it the generic type so it knows exactly what it's moving over. We're just going to call it Iter, and we're going to give it the constructor of the list object or the container. Now one thing we have to do here is we have to figure out where we are in the list. Well by default, we're at the beginning. So what we're going to do is we're going to say while, and we're going to say Iter has next, and we're just going to say QdebugIter.next. Now it's important to note that the iterator is not the actual item, it's just a pointer to it. So really what we're doing here is we're saying get kind of a dictionary, if you will, of this list, and then we're going to start at the beginning. And then we're going to say if you have a next item, go to the next item. You notice how this is a function. Well what this is doing is it's actually returning the next item. So let's just save and run, and sure enough, there we go. Now another neat thing you can do is you can say, how do we do this in reverse? In other words, how do we go from the highest to the lowest? So say Iter to back, and that moves it to the back of the list. And then we'll just say Iter has previous, and then we're just going to get the previous item here. So when we run this, sure enough, it goes from highest to lowest. So that's how you can navigate through the list here. Actually pretty simple to do. Now one thing you can also do is you can peek, and what a peek is is very simple. Let's say you want to know what the next item is without actually moving to it. So you'll say, if Iter, I'll see here, Iter, sorry I'm not wearing my glasses again, we'll say half previous, and then we'll just say, let's copy and paste this here, we'll say peek previous, because we want to know what the next item is without actually moving to it yet. And we'll just say next, save and run. So we can see that we're printing out nine. So that's where we currently are, and we're going to peek ahead, see the next one is eight, and then we're going to actually move to it. So that's how the peek works. And there is a peek previous and peek next, sorry about that. So that in a nutshell is the QList Iterator and how to navigate through the list. Pretty simple stuff. Well this is Brian, thank you for watching, I hope you found this video educational and entertaining.