Hello! i am new to Qt and i have a problem in writing to a file.

when i specify ReadOnly, it seems to be fine. it can open and read the contents of the file. but if i write WriteOnly or ReadWrite, it cannot even open the file. Why is that so?

hope you can help me on this. BTW, i got the code from the Qt documentation.

Thanks.