1 Star 0 Fork 0

shan.li / pyserial-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ui_demo_1.ui 11.91 KB
一键复制 编辑 原始数据 按行查看 历史
zzm 提交于 2018-04-19 10:47 . Initial commit
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>707</width>
<height>458</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QGroupBox" name="formGroupBox">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>167</width>
<height>301</height>
</rect>
</property>
<property name="title">
<string>串口设置</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="horizontalSpacing">
<number>10</number>
</property>
<property name="verticalSpacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="s1__lb_1">
<property name="text">
<string>串口检测:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="s1__box_1">
<property name="text">
<string>检测串口</string>
</property>
<property name="autoRepeatInterval">
<number>100</number>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="s1__lb_2">
<property name="text">
<string>串口选择:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="s1__box_2"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="s1__lb_3">
<property name="text">
<string>波特率:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="s1__box_3">
<item>
<property name="text">
<string>115200</string>
</property>
</item>
<item>
<property name="text">
<string>2400</string>
</property>
</item>
<item>
<property name="text">
<string>4800</string>
</property>
</item>
<item>
<property name="text">
<string>9600</string>
</property>
</item>
<item>
<property name="text">
<string>14400</string>
</property>
</item>
<item>
<property name="text">
<string>19200</string>
</property>
</item>
<item>
<property name="text">
<string>38400</string>
</property>
</item>
<item>
<property name="text">
<string>57600</string>
</property>
</item>
<item>
<property name="text">
<string>76800</string>
</property>
</item>
<item>
<property name="text">
<string>12800</string>
</property>
</item>
<item>
<property name="text">
<string>230400</string>
</property>
</item>
<item>
<property name="text">
<string>460800</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="s1__lb_4">
<property name="text">
<string>数据位:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="s1__box_4">
<item>
<property name="text">
<string>8</string>
</property>
</item>
<item>
<property name="text">
<string>7</string>
</property>
</item>
<item>
<property name="text">
<string>6</string>
</property>
</item>
<item>
<property name="text">
<string>5</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="s1__lb_5">
<property name="text">
<string>校验位:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="s1__box_5">
<item>
<property name="text">
<string>N</string>
</property>
</item>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="QPushButton" name="open_button">
<property name="text">
<string>打开串口</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<widget class="QPushButton" name="close_button">
<property name="text">
<string>关闭串口</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="s1__lb_6">
<property name="text">
<string>停止位:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="s1__box_6">
<item>
<property name="text">
<string>1</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="state_label">
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="verticalGroupBox">
<property name="geometry">
<rect>
<x>210</x>
<y>20</y>
<width>401</width>
<height>241</height>
</rect>
</property>
<property name="title">
<string>接受区</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item>
<widget class="QTextBrowser" name="s2__receive_text"/>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="verticalGroupBox_2">
<property name="geometry">
<rect>
<x>210</x>
<y>280</y>
<width>401</width>
<height>101</height>
</rect>
</property>
<property name="title">
<string>发送区</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item>
<widget class="QTextEdit" name="s3__send_text">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;123456&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="s3__send_button">
<property name="geometry">
<rect>
<x>620</x>
<y>310</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>发送</string>
</property>
</widget>
<widget class="QPushButton" name="s3__clear_button">
<property name="geometry">
<rect>
<x>620</x>
<y>350</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>清除</string>
</property>
</widget>
<widget class="QGroupBox" name="formGroupBox">
<property name="geometry">
<rect>
<x>20</x>
<y>340</y>
<width>171</width>
<height>101</height>
</rect>
</property>
<property name="title">
<string>串口状态</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<property name="horizontalSpacing">
<number>10</number>
</property>
<property name="verticalSpacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>已接收:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>已发送:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_2"/>
</item>
</layout>
</widget>
<widget class="QCheckBox" name="hex_send">
<property name="geometry">
<rect>
<x>620</x>
<y>280</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Hex发送</string>
</property>
</widget>
<widget class="QCheckBox" name="hex_receive">
<property name="geometry">
<rect>
<x>620</x>
<y>40</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Hex接收</string>
</property>
</widget>
<widget class="QPushButton" name="s2__clear_button">
<property name="geometry">
<rect>
<x>620</x>
<y>80</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>清除</string>
</property>
</widget>
<widget class="QCheckBox" name="timer_send_cb">
<property name="geometry">
<rect>
<x>260</x>
<y>390</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>定时发送</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_3">
<property name="geometry">
<rect>
<x>350</x>
<y>390</y>
<width>61</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>1000</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" name="dw">
<property name="geometry">
<rect>
<x>420</x>
<y>390</y>
<width>54</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>ms/次</string>
</property>
</widget>
<zorder>verticalGroupBox</zorder>
<zorder>verticalGroupBox_2</zorder>
<zorder>formGroupBox</zorder>
<zorder>s3__send_button</zorder>
<zorder>s3__clear_button</zorder>
<zorder>formGroupBox</zorder>
<zorder>hex_send</zorder>
<zorder>hex_receive</zorder>
<zorder>s2__clear_button</zorder>
<zorder>timer_send_cb</zorder>
<zorder>lineEdit_3</zorder>
<zorder>dw</zorder>
</widget>
<resources/>
<connections/>
</ui>
Python
1
https://gitee.com/lishan666/pyserial-demo.git
git@gitee.com:lishan666/pyserial-demo.git
lishan666
pyserial-demo
pyserial-demo
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891