简单 CoAP 客户端范例

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>OptionDialog</class>
 <widget class="QDialog" name="OptionDialog">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>414</width>
    <height>313</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Add Options</string>
  </property>
  <layout class="QHBoxLayout" name="horizontalLayout_3">
   <item>
    <layout class="QHBoxLayout" name="horizontalLayout_2">
     <item>
      <layout class="QVBoxLayout" name="verticalLayout_2">
       <item>
        <layout class="QHBoxLayout" name="horizontalLayout">
         <item>
          <widget class="QLabel" name="label">
           <property name="text">
            <string>Option</string>
           </property>
          </widget>
         </item>
         <item>
          <widget class="QComboBox" name="optionComboBox">
           <property name="sizePolicy">
            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
           <property name="minimumSize">
            <size>
             <width>120</width>
             <height>0</height>
            </size>
           </property>
          </widget>
         </item>
         <item>
          <widget class="QLineEdit" name="optionValueEdit"/>
         </item>
        </layout>
       </item>
       <item>
        <widget class="QTableWidget" name="tableWidget">
         <property name="columnCount">
          <number>2</number>
         </property>
         <column/>
         <column/>
        </widget>
       </item>
       <item>
        <widget class="QDialogButtonBox" name="buttonBox">
         <property name="orientation">
          <enum>Qt::Horizontal</enum>
         </property>
         <property name="standardButtons">
          <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
         </property>
        </widget>
       </item>
      </layout>
     </item>
     <item>
      <layout class="QVBoxLayout" name="verticalLayout">
       <item>
        <widget class="QPushButton" name="addButton">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
         <property name="minimumSize">
          <size>
           <width>100</width>
           <height>0</height>
          </size>
         </property>
         <property name="text">
          <string>Add</string>
         </property>
        </widget>
       </item>
       <item>
        <widget class="QPushButton" name="clearButton">
         <property name="text">
          <string>Clear</string>
         </property>
        </widget>
       </item>
       <item>
        <spacer name="verticalSpacer">
         <property name="orientation">
          <enum>Qt::Vertical</enum>
         </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>20</width>
           <height>40</height>
          </size>
         </property>
        </spacer>
       </item>
      </layout>
     </item>
    </layout>
   </item>
  </layout>
 </widget>
 <resources/>
 <connections>
  <connection>
   <sender>buttonBox</sender>
   <signal>accepted()</signal>
   <receiver>OptionDialog</receiver>
   <slot>accept()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>152</x>
     <y>289</y>
    </hint>
    <hint type="destinationlabel">
     <x>206</x>
     <y>156</y>
    </hint>
   </hints>
  </connection>
  <connection>
   <sender>buttonBox</sender>
   <signal>rejected()</signal>
   <receiver>OptionDialog</receiver>
   <slot>reject()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>152</x>
     <y>289</y>
    </hint>
    <hint type="destinationlabel">
     <x>206</x>
     <y>156</y>
    </hint>
   </hints>
  </connection>
 </connections>
</ui>