概述
- 开发操作系统: win11
- Qt版本: 5.14
- 封装之初心, 用于显示网络和串口收到的源码数据, 十六进制显示,每一帧显示一行
功能
界面组成
- 全部由QTextEdit组成, 共四个。 其中,左上角的 没有用到。 仅仅起到了占位的作用。 见下图

显示范例
- 下面用于显示源码范例

用法
控件组成
- UI文件,数量:1个
- 头文件, 数量: 1个
- 源文件, 数量: 1个
UI文件源码
- ui文件名: ListCtrlEx.ui
- 文件源码:
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ListCtrlExClass</class>
<widget class="QWidget" name="ListCtrlExClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>410</width>
<height>197</height>
</rect>
</property>
<property name="windowTitle">
<string>ListCtrlEx</string>
</property>
<property name="styleSheet">
<string notr="true">font: 10pt "Consolas";</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,20">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QTextEdit" name="te_header_2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="te_line_id">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">