title: C++ and virtual methods overriding
body: <p>Sorry for this stupid question, but I can't find an answer by myself, I'm too new in C++ :(</p>
  
  <pre><code>class DBObject : public QObject
  {
      ...
  protected:
      virtual QString tableName() = 0;
  };
  
  class DBUserObject : public DBObject
  {
      ...
  protected:
      virtual QString tableName()  { return "profiles"; };
  };
  </code></pre>
  
  <p>And I have this code in parent:</p>
  
  <pre><code>DBObject::DBObject(quint32 id)
      : QObject(0)
  {
      ...    
  
      if (id != 0)
          load(id);
  }
  
  bool DBObject::load(quint32 id)
  {
      QString query = QString("select %1 from %2 where id = :id")
          .arg(fieldList().join(","))
          .arg(tableName());              &lt;--- here is trouble
      ...
  }
  </code></pre>
  
  <p>So I'm trying to execute:</p>
  
  <pre><code>DBUserObject user(3);
  </code></pre>
  
  <p>But in result I have a runtime error. Why not "profiles"?</p>