Rule number one: look from API first. Usually there are examples how to use the class, for example QFile.