What is the right way to do this? I need to pass QFile object to function which writes some data to file. I've tried to search example code but no success.