title: qlist with custom class unable to append
body: <p>I've seen other questions on here, but they deal with pointers, or with qobject derived classes, so they didn't seem relevant.</p>
  
  <p>I am trying to append values into a qlist of custom classes, here is the class</p>
  
  <pre><code>class matchPair
  {
  public:
      matchPair(int a=0, int b=0)
          : m_a(a)
          , m_b(b)
      {}
      int a() const { return m_a; }
      int b() const { return m_b; }
  
      bool operator&lt;(const matchPair &amp;rhs) const { return m_a &lt; rhs.a(); }
  //    matchPair&amp; operator=(const matchPair&amp; other) const;
  
  private:
      int m_a;
      int m_b;
  };
  
  class videodup
  {
  public:
      videodup(QString vid = "", int m_a = 0, int m_b = 0);
      ~videodup() {}
      QString video;
      bool operator==(const QString &amp;str) const { return video == str; }
  //  videodup&amp; operator=(QString vid, int m_a, int m_b);
      QList&lt;matchPair&gt; matches;
  };
  
  struct frm
  {
      QString file;
      int position;
      cv::Mat descriptors;
      QList&lt;videodup&gt; videomatches;
  };
  QList&lt;frm&gt; frames;
  </code></pre>
  
  <p>and the line that fails is:</p>
  
  <pre><code>frame.videomatches.at( frame.videomatches.indexOf(vid) ).matches.append(pair);
  </code></pre>
  
  <p>the error I get is:</p>
  
  <pre><code>/usr/local/Cellar/qt5/5.5.1_2/lib/QtCore.framework/Headers/qlist.h:191: candidate function not viable: 'this' argument has type 'const QList&lt;matchPair&gt;', but method is not marked const
      void append(const T &amp;t);
           ^
  </code></pre>
  
  <p>what am I doing wrong?</p>