title: How to programmatically make a horizontal line in Qt
body: <p>I'm trying to figure out how to make a horizontal line in Qt. This is easy to create in Designer but I want to create one programmatically. I've done some googleing and looked at the xml in a ui file but haven't been able to figure anything out.</p>
  
  <p>This is what the xml from the ui file looks like:</p>
  
  <pre><code>  &lt;widget class="Line" name="line"&gt;
     &lt;property name="geometry"&gt;
      &lt;rect&gt;
       &lt;x&gt;150&lt;/x&gt;
       &lt;y&gt;110&lt;/y&gt;
       &lt;width&gt;118&lt;/width&gt;
       &lt;height&gt;3&lt;/height&gt;
      &lt;/rect&gt;
     &lt;/property&gt;
     &lt;property name="orientation"&gt;
      &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
     &lt;/property&gt;
    &lt;/widget&gt;
  </code></pre>