I want to write a file on C drive on windows using Qt c++
what I try 

```
QFile file("C:/key.txt");
if (!file.exists())
{
    file.open(QIODevice::WriteOnly | QIODevice::Text);
    file.write("0");
    file.close();
}

```

but nothing was written on C i think i should give it admin permissions so it can write to C drive but i search and found QFile::setpermissions
but it did't solve the problem too 

so any idea to solve my problem please   
 Thanks in Avdance