How can I use the `system` command where the command is written in a QString?

Like:

```
QString command="chmod -R 777 /opt/QT/examples/code/TestGUI/Data";    
system(command);

```

While compiling, I get this error:

```
cannot convert ‘QString’ to ‘const char*’
  for argument ‘1’ to ‘int system(const char*)’

```

Can anyone suggest something?