title: How to draw a custom control in QTableView?
body: <p>
  I have to draw a custom control in QTableView. This control must looks like FileChooser.</p>
  
  <p><a href="http://www.vision.ee.ethz.ch/computing/sepp-irix/qt-3.0-mo/filechooser.png" rel="nofollow noreferrer">FileChooser http://www.vision.ee.ethz.ch/computing/sepp-irix/qt-3.0-mo/filechooser.png</a></p>
  
  <pre class="lang-cpp prettyprint-override"><code>QStyleOptionButton button_option;
  button_option.state |= QStyle::State_Enabled | QStyle::State_Off;
  button_option.rect = PushButtonRect(option); //calculate button rect
  button_option.text = "...";
  QApplication::style()-&gt;drawControl(
      QStyle::CE_PushButton,
      &amp;button_option,
      painter);
  </code></pre>
  
  <p>The code above draws QStyle::CE_PushButton - that looks like QButton, - but there is no QStyle::CE_LineEdit in Qt library. How can I draw QLineEdit?</p>