The first call to next() advances the iterator to the position between the first and second item, and returns the first item;
so first call to next returns the first item (0), the second call returns the second item (1) the first call to previous returns the first item again (1)
using this image:
next and previous return the item they jumped over so if you call next 1 time it returns A as it jumps over A, the second time it jumps over B, if you then call previous it jumps over B again so it returns b again
I'm such a newbie programmer :(
I study electronics engineer and I like programming but I don't receive a good foundation in my university and I had to learn a lots of things by myself. Also, I haven't done any OOP for years and I'm new in Qt.
Many many thanks!! I will pay more attention to my coding :)
@Gfloridafan93 AFAIK you cannot bind QMap to ListView model. As model is something which communicates with the data and provides an interface to the components which use it whereas QMap is just a container which contains the actual data. May be you can write a model which can use QMap internally to store data temporarily.
@Wieland OK... So, you're replacing all the next lines in the string list to spaces and then splitting the strings by spaces. That's pretty neat. Thank you very much. This solution works perfectly for me. I upvoted all your answers. Thank you, Wieland.