title: In C++ is it a good practice to use 'this'?
body: <p>I was wondering if it was a good practice to use 'this' in C++. At first I thought I should be because that way you make obvious that the thing you are referring is a member of the current class but sometimes you end with code like:</p>
  
  <pre><code>Document::Document(QWidget *parent) : QWidget(parent)
  {
      this-&gt;file = 0;
      this-&gt;layout = new QGridLayout(this);
      this-&gt;layout-&gt;setSpacing(2);
      this-&gt;layout-&gt;setMargin(0);
      this-&gt;setLayout(this.layout);
      this-&gt;textArea = new QTextEdit(this);
      this-&gt;textArea-&gt;setLineWrapMode(QTextEdit::NoWrap);
      this-&gt;textArea-&gt;setAcceptDrops(true);
      this-&gt;textArea-&gt;setAcceptRichText(true);
      this-&gt;textArea-&gt;setUndoRedoEnabled(true);
      this-&gt;textArea-&gt;setFont(QFont("Mono" , 11));
      this-&gt;layout-&gt;addWidget(this-&gt;textArea);
      this-&gt;textArea-&gt;show();
      this-&gt;textArea-&gt;setFocus();
  }
  </code></pre>
  
  <p>I thing this would look a lot better without all the 'this' specially when it  is used like <code>this-&gt;layout-&gt;addWidget(this.textArea);</code>. And I think the code should use the same style in most cases to make it easier to be read so, should I use 'this' just when it is necessary or is it a good practice to use it to make clear that you are referencing a member of the same class.</p>