You are hacking your way into problems:
1) you declare QTextStream out - and never use it...
2) the QTextStream is named out because you don't use it to read the file![]()
3) you don't check that the string fn (i assume that is a QString) is actually a file path/name that exist...
I don't see the problem, but my advice is: organize your code, don't just test in your actual project and then you don't know what's for testing and what's actual project, if you need a quick test to see how to write some small functionality - write it in a small separated project and test there.
And you use ContactList - is a hand-written container? or what is that? are you sure the bug is not there - use the debugger and you will see (or as SixDegrees said print to console as you read - and don't forget to check the file name)




Reply With Quote
Bookmarks