Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

mainwindow.ui Example File

modbus/slave/mainwindow.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>MainWindow</class>
 <widget class="QMainWindow" name="MainWindow">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>516</width>
    <height>396</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Modbus Server Example</string>
  </property>
  <widget class="QWidget" name="centralWidget">
   <layout class="QVBoxLayout" name="verticalLayout">
    <property name="topMargin">
     <number>9</number>
    </property>
    <property name="bottomMargin">
     <number>0</number>
    </property>
    <item>
     <layout class="QGridLayout" name="gridLayout">
      <item row="0" column="5">
       <widget class="QLabel" name="label_27">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>Server Address:</string>
        </property>
       </widget>
      </item>
      <item row="0" column="7">
       <widget class="QPushButton" name="connectButton">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>Connect</string>
        </property>
        <property name="checkable">
         <bool>false</bool>
        </property>
        <property name="autoDefault">
         <bool>false</bool>
        </property>
        <property name="default">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item row="0" column="6">
       <widget class="QSpinBox" name="serverEdit">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimum">
         <number>1</number>
        </property>
        <property name="maximum">
         <number>247</number>
        </property>
       </widget>
      </item>
      <item row="0" column="4">
       <spacer name="horizontalSpacer">
        <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
        <property name="sizeHint" stdset="0">
         <size>
          <width>40</width>
          <height>20</height>
         </size>
        </property>
       </spacer>
      </item>
      <item row="0" column="1">
       <widget class="QComboBox" name="connectType">
        <item>
         <property name="text">
          <string>Serial</string>
         </property>
        </item>
        <item>
         <property name="text">
          <string>TCP</string>
         </property>
        </item>
       </widget>
      </item>
      <item row="0" column="2">
       <widget class="QLabel" name="label_2">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>Port:</string>
        </property>
       </widget>
      </item>
      <item row="0" column="0">
       <widget class="QLabel" name="label">
        <property name="text">
         <string>Connection type:</string>
        </property>
       </widget>
      </item>
      <item row="0" column="3">
       <widget class="QLineEdit" name="portEdit">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
       </widget>
      </item>
     </layout>
    </item>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
       <widget class="QCheckBox" name="setBusyBox">
        <property name="text">
         <string>Set server busy</string>
        </property>
       </widget>
      </item>
      <item>
       <widget class="QCheckBox" name="listenOnlyBox">
        <property name="text">
         <string>Set server listen only</string>
        </property>
       </widget>
      </item>
      <item>
       <spacer name="horizontalSpacer_2">
        <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
        <property name="sizeHint" stdset="0">
         <size>
          <width>40</width>
          <height>20</height>
         </size>
        </property>
       </spacer>
      </item>
     </layout>
    </item>
    <item>
     <spacer name="verticalSpacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
      <property name="sizeType">
       <enum>QSizePolicy::Maximum</enum>
      </property>
      <property name="sizeHint" stdset="0">
       <size>
        <width>20</width>
        <height>0</height>
       </size>
      </property>
     </spacer>
    </item>
    <item>
     <layout class="QGridLayout" name="gridLayout_2">
      <item row="3" column="1">
       <widget class="QCheckBox" name="disc_2">
        <property name="text">
         <string>2</string>
        </property>
       </widget>
      </item>
      <item row="3" column="2">
       <widget class="QLabel" name="label_23">
        <property name="text">
         <string>2</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="3" column="4">
       <widget class="QLineEdit" name="holdReg_2">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="4" column="0">
       <widget class="QCheckBox" name="coils_3">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>3</string>
        </property>
       </widget>
      </item>
      <item row="3" column="3">
       <widget class="QLineEdit" name="inReg_2">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="4" column="1">
       <widget class="QCheckBox" name="disc_3">
        <property name="text">
         <string>3</string>
        </property>
       </widget>
      </item>
      <item row="4" column="2">
       <widget class="QLabel" name="label_11">
        <property name="text">
         <string>3</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="4" column="3">
       <widget class="QLineEdit" name="inReg_3">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="5" column="0">
       <widget class="QCheckBox" name="coils_4">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>4</string>
        </property>
       </widget>
      </item>
      <item row="4" column="4">
       <widget class="QLineEdit" name="holdReg_3">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="5" column="1">
       <widget class="QCheckBox" name="disc_4">
        <property name="text">
         <string>4</string>
        </property>
       </widget>
      </item>
      <item row="5" column="2">
       <widget class="QLabel" name="label_8">
        <property name="text">
         <string>4</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="5" column="3">
       <widget class="QLineEdit" name="inReg_4">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="5" column="4">
       <widget class="QLineEdit" name="holdReg_4">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="6" column="0">
       <widget class="QCheckBox" name="coils_5">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>5</string>
        </property>
       </widget>
      </item>
      <item row="6" column="3">
       <widget class="QLineEdit" name="inReg_5">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="6" column="1">
       <widget class="QCheckBox" name="disc_5">
        <property name="text">
         <string>5</string>
        </property>
       </widget>
      </item>
      <item row="6" column="2">
       <widget class="QLabel" name="label_12">
        <property name="text">
         <string>5</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="6" column="4">
       <widget class="QLineEdit" name="holdReg_5">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="7" column="0">
       <widget class="QCheckBox" name="coils_6">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>6</string>
        </property>
       </widget>
      </item>
      <item row="1" column="4">
       <widget class="QLineEdit" name="holdReg_0">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="2" column="0">
       <widget class="QCheckBox" name="coils_1">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>1</string>
        </property>
       </widget>
      </item>
      <item row="2" column="1">
       <widget class="QCheckBox" name="disc_1">
        <property name="text">
         <string>1</string>
        </property>
       </widget>
      </item>
      <item row="2" column="2">
       <widget class="QLabel" name="label_22">
        <property name="text">
         <string>1</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="2" column="3">
       <widget class="QLineEdit" name="inReg_1">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="2" column="4">
       <widget class="QLineEdit" name="holdReg_1">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="3" column="0">
       <widget class="QCheckBox" name="coils_2">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>2</string>
        </property>
       </widget>
      </item>
      <item row="10" column="3">
       <widget class="QLineEdit" name="inReg_9">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="10" column="2">
       <widget class="QLabel" name="label_16">
        <property name="text">
         <string>9</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="10" column="1">
       <widget class="QCheckBox" name="disc_9">
        <property name="text">
         <string>9</string>
        </property>
       </widget>
      </item>
      <item row="10" column="4">
       <widget class="QLineEdit" name="holdReg_9">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="7" column="3">
       <widget class="QLineEdit" name="inReg_6">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="7" column="1">
       <widget class="QCheckBox" name="disc_6">
        <property name="text">
         <string>6</string>
        </property>
       </widget>
      </item>
      <item row="7" column="4">
       <widget class="QLineEdit" name="holdReg_6">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="8" column="0">
       <widget class="QCheckBox" name="coils_7">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>7</string>
        </property>
       </widget>
      </item>
      <item row="7" column="2">
       <widget class="QLabel" name="label_13">
        <property name="text">
         <string>6</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="8" column="1">
       <widget class="QCheckBox" name="disc_7">
        <property name="text">
         <string>7</string>
        </property>
       </widget>
      </item>
      <item row="8" column="3">
       <widget class="QLineEdit" name="inReg_7">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="8" column="2">
       <widget class="QLabel" name="label_14">
        <property name="text">
         <string>7</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="8" column="4">
       <widget class="QLineEdit" name="holdReg_7">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="9" column="0">
       <widget class="QCheckBox" name="coils_8">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>8</string>
        </property>
       </widget>
      </item>
      <item row="9" column="1">
       <widget class="QCheckBox" name="disc_8">
        <property name="text">
         <string>8</string>
        </property>
       </widget>
      </item>
      <item row="9" column="2">
       <widget class="QLabel" name="label_15">
        <property name="text">
         <string>8</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="9" column="3">
       <widget class="QLineEdit" name="inReg_8">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="10" column="0">
       <widget class="QCheckBox" name="coils_9">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>9</string>
        </property>
       </widget>
      </item>
      <item row="9" column="4">
       <widget class="QLineEdit" name="holdReg_8">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="0" column="1">
       <widget class="QLabel" name="discreteInputs">
        <property name="text">
         <string>Discrete Inputs</string>
        </property>
       </widget>
      </item>
      <item row="0" column="3">
       <widget class="QLabel" name="inputRegisters">
        <property name="text">
         <string>Input Registers</string>
        </property>
       </widget>
      </item>
      <item row="0" column="0">
       <widget class="QLabel" name="coils">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>Coils</string>
        </property>
       </widget>
      </item>
      <item row="0" column="2">
       <widget class="QLabel" name="address">
        <property name="text">
         <string>Address</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
      <item row="0" column="4">
       <widget class="QLabel" name="holdingRegisters">
        <property name="text">
         <string>Holding Registers</string>
        </property>
       </widget>
      </item>
      <item row="1" column="0">
       <widget class="QCheckBox" name="coils_0">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
         <string>0</string>
        </property>
       </widget>
      </item>
      <item row="1" column="1">
       <widget class="QCheckBox" name="disc_0">
        <property name="text">
         <string>0</string>
        </property>
       </widget>
      </item>
      <item row="1" column="3">
       <widget class="QLineEdit" name="inReg_0">
        <property name="maxLength">
         <number>32767</number>
        </property>
        <property name="placeholderText">
         <string>Hexadecimal A-F, a-f, 0-9.</string>
        </property>
       </widget>
      </item>
      <item row="1" column="2">
       <widget class="QLabel" name="label_21">
        <property name="text">
         <string>0</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
     </layout>
    </item>
    <item>
     <spacer name="verticalSpacer_2">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
      <property name="sizeType">
       <enum>QSizePolicy::MinimumExpanding</enum>
      </property>
      <property name="sizeHint" stdset="0">
       <size>
        <width>20</width>
        <height>0</height>
       </size>
      </property>
     </spacer>
    </item>
   </layout>
  </widget>
  <widget class="QStatusBar" name="statusBar"/>
  <widget class="QMenuBar" name="menuBar">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>516</width>
     <height>21</height>
    </rect>
   </property>
   <widget class="QMenu" name="menu_Device">
    <property name="title">
     <string>&amp;Device</string>
    </property>
    <addaction name="actionConnect"/>
    <addaction name="actionDisconnect"/>
    <addaction name="separator"/>
    <addaction name="actionExit"/>
   </widget>
   <widget class="QMenu" name="menuToo_ls">
    <property name="title">
     <string>Too&amp;ls</string>
    </property>
    <addaction name="actionOptions"/>
   </widget>
   <addaction name="menu_Device"/>
   <addaction name="menuToo_ls"/>
  </widget>
  <action name="actionConnect">
   <property name="icon">
    <iconset resource="slave.qrc">
     <normaloff>:/images/connect.png</normaloff>:/images/connect.png</iconset>
   </property>
   <property name="text">
    <string>&amp;Connect</string>
   </property>
  </action>
  <action name="actionDisconnect">
   <property name="icon">
    <iconset resource="slave.qrc">
     <normaloff>:/images/disconnect.png</normaloff>:/images/disconnect.png</iconset>
   </property>
   <property name="text">
    <string>&amp;Disconnect</string>
   </property>
  </action>
  <action name="actionExit">
   <property name="icon">
    <iconset resource="slave.qrc">
     <normaloff>:/images/application-exit.png</normaloff>:/images/application-exit.png</iconset>
   </property>
   <property name="text">
    <string>&amp;Quit</string>
   </property>
  </action>
  <action name="actionOptions">
   <property name="icon">
    <iconset resource="slave.qrc">
     <normaloff>:/images/settings.png</normaloff>:/images/settings.png</iconset>
   </property>
   <property name="text">
    <string>&amp;Options</string>
   </property>
  </action>
 </widget>
 <layoutdefault spacing="6" margin="11"/>
 <tabstops>
  <tabstop>connectType</tabstop>
  <tabstop>portEdit</tabstop>
  <tabstop>serverEdit</tabstop>
  <tabstop>connectButton</tabstop>
  <tabstop>coils_0</tabstop>
  <tabstop>disc_0</tabstop>
  <tabstop>inReg_0</tabstop>
  <tabstop>holdReg_0</tabstop>
  <tabstop>coils_1</tabstop>
  <tabstop>disc_1</tabstop>
  <tabstop>inReg_1</tabstop>
  <tabstop>holdReg_1</tabstop>
  <tabstop>coils_2</tabstop>
  <tabstop>disc_2</tabstop>
  <tabstop>inReg_2</tabstop>
  <tabstop>holdReg_2</tabstop>
  <tabstop>coils_3</tabstop>
  <tabstop>disc_3</tabstop>
  <tabstop>inReg_3</tabstop>
  <tabstop>holdReg_3</tabstop>
  <tabstop>coils_4</tabstop>
  <tabstop>disc_4</tabstop>
  <tabstop>inReg_4</tabstop>
  <tabstop>holdReg_4</tabstop>
  <tabstop>coils_5</tabstop>
  <tabstop>disc_5</tabstop>
  <tabstop>inReg_5</tabstop>
  <tabstop>holdReg_5</tabstop>
  <tabstop>coils_6</tabstop>
  <tabstop>disc_6</tabstop>
  <tabstop>inReg_6</tabstop>
  <tabstop>holdReg_6</tabstop>
  <tabstop>coils_7</tabstop>
  <tabstop>disc_7</tabstop>
  <tabstop>inReg_7</tabstop>
  <tabstop>holdReg_7</tabstop>
  <tabstop>coils_8</tabstop>
  <tabstop>disc_8</tabstop>
  <tabstop>inReg_8</tabstop>
  <tabstop>holdReg_8</tabstop>
  <tabstop>coils_9</tabstop>
  <tabstop>disc_9</tabstop>
  <tabstop>inReg_9</tabstop>
  <tabstop>holdReg_9</tabstop>
 </tabstops>
 <resources>
  <include location="slave.qrc"/>
 </resources>
 <connections/>
</ui>
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded