title: Using QHash in a custom class
body: <p>I am newbie in Qt and learning to handle how QHash works. On working with this example I dont understand why this throws me an error. I may miss something, but please guide me to learn this.</p>
  
  <p>main.cpp</p>
  
  <pre><code>int main(int argc, char *argv[])
  {
  QApplication a(argc, argv);
  QHash&lt;QString,Person&gt; hash;
  QString key="1";
  
  Person p;
  p.name = name;
  p.number = an;
  
  hash.insert(key,p); 
  
      return a.exec();
  }
  </code></pre>
  
  <p>person.h</p>
  
  <pre><code>class Person
  {
  public:
      Person();
      Person(QString name,QString num);
      bool operator==(const Person &amp; other) const; //== overloading to assign in QHash
      QString name,number;
  };
  </code></pre>
  
  <p>person.cpp</p>
  
  <pre><code>Person::Person()
  {
  }
  Person::Person(QString name, QString num)
  {
      this-&gt;name=name;
      this-&gt;number=num;
  }
  bool Person::operator==(const Person &amp; other) const
  {
      bool state;
      if (name == other.name )
          state = true;
      else
          state = false;
  
      return state;
  }
  </code></pre>
  
  <p>and the error is:-'qHash':none of the 17 overloads could convert all the argument type.I knw im missing something.Please guide me.</p>