title: Select text of QLineEdit on focus
body: <p>I have created a dialog using QtDesigner. There is a <code>QLineEdit</code> object in the dialog with some default content. When the dialog initializes and the focus goes to the <code>QLineEdit</code>, I want the default content to be auto selected, so once the user start writing, the previous content will be overwritten.</p>
  
  <p><strong><em>EDIT:</em></strong></p>
  
  <p>In constructor:</p>
  
  <pre><code>dialog-&gt;accept(); 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>connect( dialog, SIGNAL(accepted()), QlineObj, SLOT( selectAll() ) );
  </code></pre>