2 Star 3 Fork 1

starlxy123 / qt富文本编辑器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mainwindow.ui 8.95 KB
一键复制 编辑 原始数据 按行查看 历史
starlxy123 提交于 2023-10-20 20:50 . 放大跟随,对齐优化
<?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>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>lxy的文本编辑器</string>
</property>
<property name="windowIcon">
<iconset resource="res.qrc">
<normaloff>:/icons/proIcon.svg</normaloff>:/icons/proIcon.svg</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QTextEdit" name="textEdit">
<property name="geometry">
<rect>
<x>0</x>
<y>-1</y>
<width>801</width>
<height>443</height>
</rect>
</property>
<property name="font">
<font>
<family>Monospace</family>
<pointsize>18</pointsize>
</font>
</property>
<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;meta charset=&quot;utf-8&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
li.unchecked::marker { content: &quot;\2610&quot;; }
li.checked::marker { content: &quot;\2612&quot;; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Monospace'; font-size:18pt; 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;Hello!&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&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;欢迎使用lxy自制文本编辑器&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&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;创作开始日期:2023.10.18&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&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;作者:刘笑宇&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&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;邮箱:1150619697@qq.com&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&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;更多功能持续更新中...&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>27</height>
</rect>
</property>
<widget class="QMenu" name="menu">
<property name="title">
<string>文件</string>
</property>
</widget>
<addaction name="menu"/>
</widget>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<property name="movable">
<bool>true</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="floatable">
<bool>true</bool>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="newFileAction"/>
<addaction name="OpenFileAction"/>
<addaction name="saveFileAction"/>
<addaction name="separator"/>
<addaction name="boldAction"/>
<addaction name="underlineAction"/>
<addaction name="italicAction"/>
<addaction name="separator"/>
<addaction name="leftAction"/>
<addaction name="centerAction"/>
<addaction name="rightAction"/>
<addaction name="justifyAction"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<action name="saveFileAction">
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/save.svg</normaloff>:/icons/save.svg</iconset>
</property>
<property name="text">
<string>保存文件</string>
</property>
<property name="toolTip">
<string>保存文件</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action>
<action name="OpenFileAction">
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/open.svg</normaloff>:/icons/open.svg</iconset>
</property>
<property name="text">
<string>打开文件</string>
</property>
<property name="toolTip">
<string>打开文件</string>
</property>
</action>
<action name="newFileAction">
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/newFile.svg</normaloff>:/icons/newFile.svg</iconset>
</property>
<property name="text">
<string>新建文件</string>
</property>
<property name="toolTip">
<string>新建文件</string>
</property>
</action>
<action name="boldAction">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/bold.svg</normaloff>:/icons/bold.svg</iconset>
</property>
<property name="text">
<string>加粗</string>
</property>
<property name="toolTip">
<string>加粗</string>
</property>
</action>
<action name="underlineAction">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/underline.svg</normaloff>:/icons/underline.svg</iconset>
</property>
<property name="text">
<string>下划线</string>
</property>
<property name="toolTip">
<string>下划线</string>
</property>
</action>
<action name="italicAction">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/italic.svg</normaloff>:/icons/italic.svg</iconset>
</property>
<property name="text">
<string>斜体</string>
</property>
<property name="toolTip">
<string>斜体</string>
</property>
</action>
<action name="leftAction">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/leftAlign.svg</normaloff>:/icons/leftAlign.svg</iconset>
</property>
<property name="text">
<string>左对齐</string>
</property>
<property name="toolTip">
<string>左对齐</string>
</property>
</action>
<action name="centerAction">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/centerAlign.svg</normaloff>:/icons/centerAlign.svg</iconset>
</property>
<property name="text">
<string>居中</string>
</property>
<property name="toolTip">
<string>居中</string>
</property>
</action>
<action name="rightAction">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/rightAlign.svg</normaloff>:/icons/rightAlign.svg</iconset>
</property>
<property name="text">
<string>右对齐</string>
</property>
<property name="toolTip">
<string>右对齐</string>
</property>
</action>
<action name="justifyAction">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/icons/justifyAlign.svg</normaloff>:/icons/justifyAlign.svg</iconset>
</property>
<property name="text">
<string>两端对齐</string>
</property>
<property name="toolTip">
<string>两端对齐</string>
</property>
</action>
</widget>
<resources>
<include location="res.qrc"/>
</resources>
<connections/>
</ui>
C++
1
https://gitee.com/starlxy123/text-edit_demo.git
git@gitee.com:starlxy123/text-edit_demo.git
starlxy123
text-edit_demo
qt富文本编辑器
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891