mainwindow.ui Example File

calculator-widgets/mainwindow.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>MainWindow</class>
 <widget class="QWidget" name="MainWindow">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>364</width>
    <height>182</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Form</string>
  </property>
  <layout class="QGridLayout" name="gridLayout_2">
   <item row="0" column="0" colspan="2">
    <widget class="QLabel" name="display">
     <property name="frameShape">
      <enum>QFrame::StyledPanel</enum>
     </property>
     <property name="alignment">
      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     </property>
    </widget>
   </item>
   <item row="1" column="0">
    <spacer name="horizontalSpacer">
     <property name="orientation">
      <enum>Qt::Horizontal</enum>
     </property>
     <property name="sizeHint" stdset="0">
      <size>
       <width>20</width>
       <height>20</height>
      </size>
     </property>
    </spacer>
   </item>
   <item row="1" column="1">
    <layout class="QGridLayout" name="gridLayout">
     <item row="0" column="0">
      <widget class="QPushButton" name="digit7">
       <property name="text">
        <string>7</string>
       </property>
      </widget>
     </item>
     <item row="3" column="1">
      <widget class="QPushButton" name="point">
       <property name="text">
        <string>.</string>
       </property>
      </widget>
     </item>
     <item row="1" column="1">
      <widget class="QPushButton" name="digit5">
       <property name="text">
        <string>5</string>
       </property>
      </widget>
     </item>
     <item row="0" column="2">
      <widget class="QPushButton" name="digit9">
       <property name="text">
        <string>9</string>
       </property>
      </widget>
     </item>
     <item row="0" column="1">
      <widget class="QPushButton" name="digit8">
       <property name="text">
        <string>8</string>
       </property>
      </widget>
     </item>
     <item row="4" column="2">
      <widget class="QPushButton" name="c">
       <property name="text">
        <string>C</string>
       </property>
      </widget>
     </item>
     <item row="1" column="0">
      <widget class="QPushButton" name="digit4">
       <property name="text">
        <string>4</string>
       </property>
      </widget>
     </item>
     <item row="2" column="3">
      <widget class="QPushButton" name="operStar">
       <property name="text">
        <string>*</string>
       </property>
      </widget>
     </item>
     <item row="2" column="2">
      <widget class="QPushButton" name="digit3">
       <property name="text">
        <string>3</string>
       </property>
      </widget>
     </item>
     <item row="4" column="3">
      <widget class="QPushButton" name="equals">
       <property name="text">
        <string>=</string>
       </property>
      </widget>
     </item>
     <item row="1" column="3">
      <widget class="QPushButton" name="operMinus">
       <property name="text">
        <string>-</string>
       </property>
      </widget>
     </item>
     <item row="2" column="0">
      <widget class="QPushButton" name="digit1">
       <property name="text">
        <string>1</string>
       </property>
      </widget>
     </item>
     <item row="3" column="0">
      <widget class="QPushButton" name="digit0">
       <property name="text">
        <string>0</string>
       </property>
      </widget>
     </item>
     <item row="3" column="3">
      <widget class="QPushButton" name="operDiv">
       <property name="text">
        <string>/</string>
       </property>
      </widget>
     </item>
     <item row="0" column="3">
      <widget class="QPushButton" name="operPlus">
       <property name="text">
        <string>+</string>
       </property>
      </widget>
     </item>
     <item row="1" column="2">
      <widget class="QPushButton" name="digit6">
       <property name="text">
        <string>6</string>
       </property>
      </widget>
     </item>
     <item row="2" column="1">
      <widget class="QPushButton" name="digit2">
       <property name="text">
        <string>2</string>
       </property>
      </widget>
     </item>
    </layout>
   </item>
   <item row="2" column="1">
    <spacer name="verticalSpacer">
     <property name="orientation">
      <enum>Qt::Vertical</enum>
     </property>
     <property name="sizeHint" stdset="0">
      <size>
       <width>20</width>
       <height>10</height>
      </size>
     </property>
    </spacer>
   </item>
  </layout>
 </widget>
 <resources/>
 <connections/>
</ui>