title: The UI designed by Qtdesigner is not the same as the one previewed in Qtdesigner when translated into Python code
body: <p>I guess the problem is layout, and I want to make the top line with the buttons in the Frame, Horizontal Layout;Below is the TabWidget with a table in it. The TabWidget and Frame use Vertical Layout.Previews in Qtdesigner are normal, but a BUG appears after the py file is converted.
  I made a smaller example to illustrate the problem. Here is the UI file code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ui version="4.0"&gt;
   &lt;class&gt;Form&lt;/class&gt;
   &lt;widget class="QWidget" name="Form"&gt;
    &lt;property name="geometry"&gt;
     &lt;rect&gt;
      &lt;x&gt;0&lt;/x&gt;
      &lt;y&gt;0&lt;/y&gt;
      &lt;width&gt;1191&lt;/width&gt;
      &lt;height&gt;941&lt;/height&gt;
     &lt;/rect&gt;
    &lt;/property&gt;
    &lt;property name="windowTitle"&gt;
     &lt;string&gt;Form&lt;/string&gt;
    &lt;/property&gt;
    &lt;layout class="QVBoxLayout" name="verticalLayout_3"&gt;
     &lt;item&gt;
      &lt;layout class="QVBoxLayout" name="verticalLayout_2"&gt;
       &lt;item&gt;
        &lt;widget class="QFrame" name="frame"&gt;
         &lt;property name="frameShape"&gt;
          &lt;enum&gt;QFrame::StyledPanel&lt;/enum&gt;
         &lt;/property&gt;
         &lt;property name="frameShadow"&gt;
          &lt;enum&gt;QFrame::Raised&lt;/enum&gt;
         &lt;/property&gt;
         &lt;layout class="QHBoxLayout" name="horizontalLayout"&gt;
          &lt;item&gt;
           &lt;widget class="QPushButton" name="pushButton"&gt;
            &lt;property name="text"&gt;
             &lt;string&gt;PushButton&lt;/string&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;widget class="QPushButton" name="pushButton_2"&gt;
            &lt;property name="text"&gt;
             &lt;string&gt;PushButton&lt;/string&gt;
            &lt;/property&gt;
           &lt;/widget&gt;
          &lt;/item&gt;
          &lt;item&gt;
           &lt;spacer name="horizontalSpacer"&gt;
            &lt;property name="orientation"&gt;
             &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
            &lt;/property&gt;
            &lt;property name="sizeHint" stdset="0"&gt;
             &lt;size&gt;
              &lt;width&gt;940&lt;/width&gt;
              &lt;height&gt;20&lt;/height&gt;
             &lt;/size&gt;
            &lt;/property&gt;
           &lt;/spacer&gt;
          &lt;/item&gt;
         &lt;/layout&gt;
        &lt;/widget&gt;
       &lt;/item&gt;
       &lt;item&gt;
        &lt;widget class="QTabWidget" name="tabWidget"&gt;
         &lt;property name="tabPosition"&gt;
          &lt;enum&gt;QTabWidget::West&lt;/enum&gt;
         &lt;/property&gt;
         &lt;property name="currentIndex"&gt;
          &lt;number&gt;0&lt;/number&gt;
         &lt;/property&gt;
         &lt;widget class="QWidget" name="tab"&gt;
          &lt;attribute name="title"&gt;
           &lt;string&gt;Tab 1&lt;/string&gt;
          &lt;/attribute&gt;
          &lt;layout class="QVBoxLayout" name="verticalLayout"&gt;
           &lt;item&gt;
            &lt;widget class="QTableWidget" name="tableWidget"&gt;
             &lt;property name="rowCount"&gt;
              &lt;number&gt;5&lt;/number&gt;
             &lt;/property&gt;
             &lt;row/&gt;
             &lt;row/&gt;
             &lt;row/&gt;
             &lt;row/&gt;
             &lt;row/&gt;
             &lt;column&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;A&lt;/string&gt;
              &lt;/property&gt;
             &lt;/column&gt;
             &lt;column&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;B&lt;/string&gt;
              &lt;/property&gt;
             &lt;/column&gt;
             &lt;column&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;C&lt;/string&gt;
              &lt;/property&gt;
             &lt;/column&gt;
             &lt;column&gt;
              &lt;property name="text"&gt;
               &lt;string&gt;D&lt;/string&gt;
              &lt;/property&gt;
             &lt;/column&gt;
            &lt;/widget&gt;
           &lt;/item&gt;
          &lt;/layout&gt;
         &lt;/widget&gt;
         &lt;widget class="QWidget" name="tab_2"&gt;
          &lt;attribute name="title"&gt;
           &lt;string&gt;Tab 2&lt;/string&gt;
          &lt;/attribute&gt;
         &lt;/widget&gt;
        &lt;/widget&gt;
       &lt;/item&gt;
      &lt;/layout&gt;
     &lt;/item&gt;
    &lt;/layout&gt;
   &lt;/widget&gt;
   &lt;resources/&gt;
   &lt;connections/&gt;
  &lt;/ui&gt;
  </code></pre>
  
  <p>I'm going to post some pictures, but I'm not sure I can, I've never uploaded pictures here...Orz.
  Here is a preview from Qtdesigner:
  <a href="https://i.stack.imgur.com/Gx734.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gx734.png" alt="designer preview"></a></p>
  
  <p>Here is the result that runs in the pycharm:</p>
  
  <p><a href="https://i.stack.imgur.com/xirQj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xirQj.png" alt="running screenshot"></a></p>
  
  <p>Here is the diagram:</p>
  
  <p><a href="https://i.stack.imgur.com/do7If.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/do7If.png" alt="inspector preview"></a></p>