I want to overload the + operator for my mainwindow class(or any other class) for Qstring. this is what I have done so far :
Qt Code:
  1. QString operator+(QString a,QString b)
  2. {
  3. qDebug()<<"works";
  4. }
To copy to clipboard, switch view to plain text mode 
but the thing is, the QString + operator is already overloaded(to concatenate, I guess). so, if I use the above code, it results in ambiguity(both the signatures are same). how do I override the actual function to my own function without making a new class to hold QString?