@Kushan That's not long.
Please debug you app to see where it is crashing. I'm out of ideas as the code you posted doesn't crash and there is not enough information to tell you why your app is crashing.
@jsulm Got it solved it was in the textfile that I used to read into the QList because the value I gave is more than the number of elements in the text file that I read!