Currently I got this solution. Is there a better one?
```
void functionName(const QString &qMethodName){
    std::string methodName = qMethodName.toStdString();
    char * p1 = new char [methodName.length()+1];
    std::strcpy (p1, methodName.data());
```