sorry, still some comments....when you manipulate filename and extension you can use QFileInfo, it's easier and safer