title: QLineEdit visible width Setting?
body: <p>How may I set the visible width of QLineEdit with <em>Qt 4.8.1</em> and up. Example would be to set the visible width to some pixel size or character width.  I wish to only use C++ not QML.</p>
  
  <p>My thought is in the direction of this block:</p>
  
  <pre><code>QHBoxLayout *nameRow = new QHBoxLayout; 
  
  QLineEdit   *firstNameText = new QLineEdit,
              *middleIntText = new QLineEdit,
              *lastNameText = new QLineEdit;
  //Whatever method is needed here to edit visible width
  //firstNameText-&gt;???
  //middleIntText-&gt;???
  //lastNameText-&gt;???
  
  nameRow-&gt;addWidget(firstNameText);
  nameRow-&gt;addWidget(middleIntText);
  nameRow-&gt;addWidget(lastNameText);
  
  layout-&gt;addLayout(nameRow);
  
  QWidget window;
  window.setLayout(layout);
  window.show();
  </code></pre>
  
  <p><strong>Answer Update:</strong> (<em>or see below</em>)</p>
  
  <pre><code>firstNameText-&gt;setMaximumWidth(100);
  firstNameText-&gt;setFixedWidth(120);
  
  middleIntText-&gt;setMaximumWidth(50);
  middleIntText-&gt;setFixedWidth(60);
  
  lastNameText-&gt;setMaximumWidth(100);
  lastNameText-&gt;setFixedWidth(120);
  </code></pre>