summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext/textedit
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/richtext/textedit')
-rw-r--r--examples/widgets/richtext/textedit/.prev_CMakeLists.txt108
-rw-r--r--examples/widgets/richtext/textedit/CMakeLists.txt114
-rw-r--r--examples/widgets/richtext/textedit/example.html84
-rw-r--r--examples/widgets/richtext/textedit/example.md104
-rw-r--r--examples/widgets/richtext/textedit/images/logo32.pngbin1410 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/checkbox-checked.pngbin1167 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/checkbox.pngbin779 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editcopy.pngbin1468 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editcut.pngbin1512 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editpaste.pngbin1906 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editredo.pngbin1752 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editundo.pngbin1746 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/exportpdf.pngbin12637 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/filenew.pngbin1172 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/fileopen.pngbin2168 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/fileprint.pngbin2087 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/filesave.pngbin2699 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/format-indent-less.pngbin1201 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/format-indent-more.pngbin993 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textbold.pngbin1611 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textcenter.pngbin1404 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textitalic.pngbin1164 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textjustify.pngbin1257 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textleft.pngbin1235 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textright.pngbin1406 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textunder.pngbin1183 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textundercolor.pngbin6916 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/zoomin.pngbin1696 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/zoomout.pngbin1662 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/checkbox-checked.pngbin1167 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/checkbox.pngbin779 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editcopy.pngbin1325 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editcut.pngbin1896 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editpaste.pngbin1482 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editredo.pngbin1787 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editundo.pngbin1768 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/exportpdf.pngbin1215 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/filenew.pngbin768 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/fileopen.pngbin1662 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/fileprint.pngbin1456 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/filesave.pngbin1205 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/format-indent-less.pngbin1201 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/format-indent-more.pngbin993 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textbold.pngbin1134 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textcenter.pngbin627 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textitalic.pngbin829 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textjustify.pngbin695 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textleft.pngbin673 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textright.pngbin677 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textunder.pngbin971 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textundercolor.pngbin6916 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/zoomin.pngbin1208 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/zoomout.pngbin1226 -> 0 bytes
-rw-r--r--examples/widgets/richtext/textedit/main.cpp85
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp897
-rw-r--r--examples/widgets/richtext/textedit/textedit.h150
-rw-r--r--examples/widgets/richtext/textedit/textedit.pro22
-rw-r--r--examples/widgets/richtext/textedit/textedit.qdoc44
-rw-r--r--examples/widgets/richtext/textedit/textedit.qrc54
59 files changed, 0 insertions, 1662 deletions
diff --git a/examples/widgets/richtext/textedit/.prev_CMakeLists.txt b/examples/widgets/richtext/textedit/.prev_CMakeLists.txt
deleted file mode 100644
index c32496a98b..0000000000
--- a/examples/widgets/richtext/textedit/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-# Generated from textedit.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(textedit LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/textedit")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-
-qt_add_executable(textedit
- main.cpp
- textedit.cpp textedit.h
-)
-set_target_properties(textedit PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(textedit PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Widgets
-)
-
-
-# Resources:
-set(textedit_resource_files
- "example.html"
- "images/logo32.png"
- "images/mac/checkbox-checked.png"
- "images/mac/checkbox.png"
- "images/mac/editcopy.png"
- "images/mac/editcut.png"
- "images/mac/editpaste.png"
- "images/mac/editredo.png"
- "images/mac/editundo.png"
- "images/mac/exportpdf.png"
- "images/mac/filenew.png"
- "images/mac/fileopen.png"
- "images/mac/fileprint.png"
- "images/mac/filesave.png"
- "images/mac/format-indent-less.png"
- "images/mac/format-indent-more.png"
- "images/mac/textbold.png"
- "images/mac/textcenter.png"
- "images/mac/textitalic.png"
- "images/mac/textjustify.png"
- "images/mac/textleft.png"
- "images/mac/textright.png"
- "images/mac/textunder.png"
- "images/mac/textundercolor.png"
- "images/mac/zoomin.png"
- "images/mac/zoomout.png"
- "images/win/checkbox-checked.png"
- "images/win/checkbox.png"
- "images/win/editcopy.png"
- "images/win/editcut.png"
- "images/win/editpaste.png"
- "images/win/editredo.png"
- "images/win/editundo.png"
- "images/win/exportpdf.png"
- "images/win/filenew.png"
- "images/win/fileopen.png"
- "images/win/fileprint.png"
- "images/win/filesave.png"
- "images/win/format-indent-less.png"
- "images/win/format-indent-more.png"
- "images/win/textbold.png"
- "images/win/textcenter.png"
- "images/win/textitalic.png"
- "images/win/textjustify.png"
- "images/win/textleft.png"
- "images/win/textright.png"
- "images/win/textunder.png"
- "images/win/textundercolor.png"
- "images/win/zoomin.png"
- "images/win/zoomout.png"
-)
-
-qt6_add_resources(textedit "textedit"
- PREFIX
- "/"
- FILES
- ${textedit_resource_files}
-)
-
-if(TARGET Qt::PrintSupport)
- target_link_libraries(textedit PUBLIC
- Qt::PrintSupport
- )
-endif()
-
-install(TARGETS textedit
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/widgets/richtext/textedit/CMakeLists.txt b/examples/widgets/richtext/textedit/CMakeLists.txt
deleted file mode 100644
index a94f50d988..0000000000
--- a/examples/widgets/richtext/textedit/CMakeLists.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-# Generated from textedit.pro.
-
-cmake_minimum_required(VERSION 3.16)
-project(textedit LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/textedit")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS PrintSupport) # special case
-
-qt_add_executable(textedit
- main.cpp
- textedit.cpp textedit.h
-)
-set_target_properties(textedit PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(textedit PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Widgets
-)
-# special case begin
-if (TARGET Qt::PrintSupport)
- target_link_libraries(textedit PUBLIC Qt::PrintSupport)
-endif()
-# special case end
-
-
-# Resources:
-set(textedit_resource_files
- "example.html"
- "images/logo32.png"
- "images/mac/checkbox-checked.png"
- "images/mac/checkbox.png"
- "images/mac/editcopy.png"
- "images/mac/editcut.png"
- "images/mac/editpaste.png"
- "images/mac/editredo.png"
- "images/mac/editundo.png"
- "images/mac/exportpdf.png"
- "images/mac/filenew.png"
- "images/mac/fileopen.png"
- "images/mac/fileprint.png"
- "images/mac/filesave.png"
- "images/mac/format-indent-less.png"
- "images/mac/format-indent-more.png"
- "images/mac/textbold.png"
- "images/mac/textcenter.png"
- "images/mac/textitalic.png"
- "images/mac/textjustify.png"
- "images/mac/textleft.png"
- "images/mac/textright.png"
- "images/mac/textunder.png"
- "images/mac/textundercolor.png"
- "images/mac/zoomin.png"
- "images/mac/zoomout.png"
- "images/win/checkbox-checked.png"
- "images/win/checkbox.png"
- "images/win/editcopy.png"
- "images/win/editcut.png"
- "images/win/editpaste.png"
- "images/win/editredo.png"
- "images/win/editundo.png"
- "images/win/exportpdf.png"
- "images/win/filenew.png"
- "images/win/fileopen.png"
- "images/win/fileprint.png"
- "images/win/filesave.png"
- "images/win/format-indent-less.png"
- "images/win/format-indent-more.png"
- "images/win/textbold.png"
- "images/win/textcenter.png"
- "images/win/textitalic.png"
- "images/win/textjustify.png"
- "images/win/textleft.png"
- "images/win/textright.png"
- "images/win/textunder.png"
- "images/win/textundercolor.png"
- "images/win/zoomin.png"
- "images/win/zoomout.png"
-)
-
-qt6_add_resources(textedit "textedit"
- PREFIX
- "/"
- FILES
- ${textedit_resource_files}
-)
-
-if(TARGET Qt::PrintSupport)
- target_link_libraries(textedit PUBLIC
- Qt::PrintSupport
- )
-endif()
-
-install(TARGETS textedit
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/widgets/richtext/textedit/example.html b/examples/widgets/richtext/textedit/example.html
deleted file mode 100644
index ca3dce23cc..0000000000
--- a/examples/widgets/richtext/textedit/example.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><title>QTextEdit Example</title><style type="text/css">
-p, li { white-space: pre-wrap; }
-hr { height: 1px; border-width: 0; }
-</style></head><body style=" font-family:'Helvetica'; font-size:9pt; font-weight:400; font-style:normal;">
-<h1 align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">QTextEdit</span></h1>
-<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">The QTextEdit widget is an advanced editor that supports formatted rich text. It can be used to display HTML and other rich document formats. Internally, QTextEdit uses the QTextDocument class to describe both the high-level structure of each document and the low-level formatting of paragraphs.</span></p>
-<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">If you are viewing this document in the <span style=" font-style:italic;">textedit</span> example, you can edit this document to explore Qt's rich text editing features. We have included some comments in each of the following sections to encourage you to experiment. </p>
-<h2 style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:18pt; font-weight:600;"><span style=" font-size:16pt;">Font and Paragraph Styles</span></h2>
-<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">QTextEdit supports </span><span style=" font-size:11pt; font-weight:600;">bold</span><span style=" font-size:11pt;">, </span><span style=" font-size:11pt; font-style:italic;">italic</span><span style=" font-size:11pt;">, and </span><span style=" font-size:11pt; text-decoration: underline;">underlined</span><span style=" font-size:11pt;"> font styles, and can display </span><span style=" font-size:11pt; font-weight:600; color:#00007f;">multicolored</span><span style=" font-size:11pt;"> </span><span style=" font-size:11pt; font-weight:600; color:#aa0000;">text</span><span style=" font-size:11pt;">. Font families such as </span><span style=" font-family:'Times New Roman'; font-size:11pt; font-weight:600;">Times New Roman</span><span style=" font-size:11pt;"> and </span><span style=" font-family:'Courier'; font-size:11pt; font-weight:600;">Courier</span><span style=" font-size:11pt;"> can also be used directly. </span><span style=" font-size:11pt; font-style:italic;">If you place the cursor in a region of styled text, the controls in the tool bars will change to reflect the current style.</span></p>
-<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">Paragraphs can be formatted so that the text is left-aligned, right-aligned, centered, or fully justified.</p>
-<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-style:italic;">Try changing the alignment of some text and resize the editor to see how the text layout changes.</span> </p>
-<h2 align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; font-weight:600;">Lists</span></h2>
-<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">Different kinds of lists can be included in rich text documents. Standard bullet lists can be nested, using different symbols for each level of the list: </span></p>
-<ul style="-qt-list-indent: 1;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Disc symbols are typically used for top-level list items. </li></ul>
-<ul type=circle style="-qt-list-indent: 2;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Circle symbols can be used to distinguish between items in lower-level lists.</li></ul>
-<ul type=square style="-qt-list-indent: 3;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Square symbols provide a reasonable alternative to discs and circles. </li></ul>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">Ordered lists can be created that can be used for tables of contents. Different characters can be used to enumerate items, and we can use both Roman and Arabic numerals in the same list structure: </p>
-<ol style="-qt-list-indent: 1;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Introduction</li>
-<li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt Tools </li></ol>
-<ol type=a style="-qt-list-indent: 2;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt Assistant</li>
-<li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt Designer</li>
-<ol type=A style="-qt-list-indent: 3;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Form Editor</li>
-<li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Component Architecture</li></ol>
-<li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt Linguist</li></ol>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">The list will automatically be renumbered if you add or remove items. <span style=" font-style:italic;">Try adding new sections to the above list or removing existing item to see the numbers change.</span> </p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
-<h2 style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Images</span></h2>
-<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">Inline images are treated like ordinary ranges of characters in the text editor, so they flow with the surrounding text. Images can also be selected in the same way as text, making it easy to cut, copy, and paste them. </span></p>
-<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><img src=":/images/logo32.png" /><span style=" font-style:italic;"> Try to select this image by clicking and dragging over it with the mouse, or use the text cursor to select it by holding down Shift and using the arrow keys. You can then cut or copy it, and paste it into different parts of this document.</span></p>
-<h2 align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; font-weight:600;">Horizontal Rule</span></h2>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Here is an example:</p>
-<hr width="50%" style=" background-color:green;"/>
-<h2 align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Tables</span></h2>
-<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">QTextEdit can arrange and format tables, supporting features such as row and column spans, text formatting within cells, and size constraints for columns. </span></p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
-<table border="1" align="center" width="90%" cellspacing="0" cellpadding="4">
-<tr>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p></td>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Development Tools </span></p></td>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Programming Techniques </span></p></td>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Graphical User Interfaces </span></p></td></tr>
-<tr>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">9:00 - 11:00 </span></p></td>
-<td colspan="3">
-<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Introduction to <span style=" font-style:italic;">Qt </span></p></td></tr>
-<tr>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">11:00 - 13:00 </span></p></td>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Using <span style=" font-style:italic;">qmake</span> </p></td>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Object-oriented Programming </p></td>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Layouts in <span style=" font-style:italic;">Qt</span> </p></td></tr>
-<tr>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">13:00 - 15:00 </span></p></td>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Qt Designer</span> Tutorial </p></td>
-<td rowspan="2">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Extreme Programming </p></td>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Writing Custom Styles </p></td></tr>
-<tr>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">15:00 - 17:00 </span></p></td>
-<td>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Qt Linguist</span> and Internationalization </p></td>
-<td></td></tr></table>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; font-style:italic;">Try adding text to the cells in the table and experiment with the alignment of the paragraphs.</p>
-<h2 style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Hyperlinks</span></h2>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">QTextEdit is designed to support hyperlinks between documents, and this feature is used extensively in </span><span style=" font-size:11pt; font-style:italic;">Qt Assistant</span><span style=" font-size:11pt;">. Hyperlinks are automatically created when an HTML file is imported into an editor. Since the rich text framework supports hyperlinks natively, they can also be created programatically.</span></p>
-<h2 style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Undo and Redo</span></h2>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">Full support for undo and redo operations is built into QTextEdit and the underlying rich text framework. Operations on a document can be packaged together to make editing a more comfortable experience for the user.</p>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-style:italic;">Try making changes to this document and press Ctrl+Z to undo them. You can always recover the original contents of the document.</span> </p></body></html>
diff --git a/examples/widgets/richtext/textedit/example.md b/examples/widgets/richtext/textedit/example.md
deleted file mode 100644
index 158728a784..0000000000
--- a/examples/widgets/richtext/textedit/example.md
+++ /dev/null
@@ -1,104 +0,0 @@
-# QTextEdit
-
-The QTextEdit widget is an advanced editor that supports formatted rich text.
-It can be used to display HTML and other rich document formats. Internally,
-QTextEdit uses the QTextDocument class to describe both the high-level
-structure of each document and the low-level formatting of paragraphs.
-
-If you are viewing this document in the textedit example, you can edit this
-document to explore Qt's rich text editing features. We have included some
-comments in each of the following sections to encourage you to experiment.
-
-## Font and Paragraph Styles
-
-QTextEdit supports **bold**, *italic*, _underline_ &amp; ~~strikethrough~~ font
-styles, and can display
-<span style="font-size:10pt; font-weight:600; color:#00007f;"> multicolored</span>
-text. Font families such as
-<span style="font-family:Times New Roman">Times New Roman</span> and
-<span style="font-family:Courier">Courier</span>
-can also be used directly. *If you place the cursor in a region of styled text,
-the controls in the tool bars will change to reflect the current style.*
-
-Paragraphs can be formatted so that the text is left-aligned, right-aligned,
-centered, or fully justified.
-
-*Try changing the alignment of some text and resize the editor to see how the
-text layout changes.*
-
-## Lists
-
-Different kinds of lists can be included in rich text documents. Standard
-bullet lists can be nested, using different symbols for each level of the list:
-
-- Disc symbols are typically used for top-level list items.
- * Circle symbols can be used to distinguish between items in lower-level
- lists.
- + Square symbols provide a reasonable alternative to discs and circles.
-
-Ordered lists can be created that can be used for tables of contents. Different
-characters can be used to enumerate items, and we can use both Roman and Arabic
-numerals in the same list structure:
-
-1. Introduction
-2. Qt Tools
- 1) Qt Assistant
- 2) Qt Designer
- 1. Form Editor
- 2. Component Architecture
- 3) Qt Linguist
-
-The list will automatically be renumbered if you add or remove items. *Try
-adding new sections to the above list or removing existing item to see the
-numbers change.*
-
-Task lists can be used to track progress on projects:
-
-- [ ] This is not yet done
-- This is just a bullet point
-- [x] This is done
-
-## Images
-
-Inline images are treated like ordinary ranges of characters in the text
-editor, so they flow with the surrounding text. Images can also be selected in
-the same way as text, making it easy to cut, copy, and paste them.
-
-![logo](images/logo32.png "logo") *Try to select this image by clicking and
-dragging over it with the mouse, or use the text cursor to select it by holding
-down Shift and using the arrow keys. You can then cut or copy it, and paste it
-into different parts of this document.*
-
-## Tables
-
-QTextEdit can arrange and format tables, supporting features such as row and
-column spans, text formatting within cells, and size constraints for columns.
-
-| | Development Tools | Programming Techniques | Graphical User Interfaces |
-| ------------: | ----------------- | ---------------------- | ------------------------- |
-| 9:00 - 11:00 | Introduction to Qt |||
-| 11:00 - 13:00 | Using qmake | Object-oriented Programming | Layouts in Qt |
-| 13:00 - 15:00 | Qt Designer Tutorial | Extreme Programming | Writing Custom Styles |
-| 15:00 - 17:00 | Qt Linguist and Internationalization | &nbsp; | &nbsp; |
-
-*Try adding text to the cells in the table and experiment with the alignment of
-the paragraphs.*
-
-## Hyperlinks
-
-QTextEdit is designed to support hyperlinks between documents, and this feature
-is used extensively in
-[Qt Assistant](http://doc.qt.io/qt-5/qtassistant-index.html). Hyperlinks are
-automatically created when an HTML file is imported into an editor. Since the
-rich text framework supports hyperlinks natively, they can also be created
-programatically.
-
-## Undo and Redo
-
-Full support for undo and redo operations is built into QTextEdit and the
-underlying rich text framework. Operations on a document can be packaged
-together to make editing a more comfortable experience for the user.
-
-*Try making changes to this document and press `Ctrl+Z` to undo them. You can
-always recover the original contents of the document.*
-
diff --git a/examples/widgets/richtext/textedit/images/logo32.png b/examples/widgets/richtext/textedit/images/logo32.png
deleted file mode 100644
index 5f91e9873b..0000000000
--- a/examples/widgets/richtext/textedit/images/logo32.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/checkbox-checked.png b/examples/widgets/richtext/textedit/images/mac/checkbox-checked.png
deleted file mode 100644
index a072d7fb5c..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/checkbox-checked.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/checkbox.png b/examples/widgets/richtext/textedit/images/mac/checkbox.png
deleted file mode 100644
index 4064909712..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/checkbox.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/editcopy.png b/examples/widgets/richtext/textedit/images/mac/editcopy.png
deleted file mode 100644
index f551364464..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/editcopy.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/editcut.png b/examples/widgets/richtext/textedit/images/mac/editcut.png
deleted file mode 100644
index a784fd5709..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/editcut.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/editpaste.png b/examples/widgets/richtext/textedit/images/mac/editpaste.png
deleted file mode 100644
index 64c0b2d6ab..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/editpaste.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/editredo.png b/examples/widgets/richtext/textedit/images/mac/editredo.png
deleted file mode 100644
index 8875bf246c..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/editredo.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/editundo.png b/examples/widgets/richtext/textedit/images/mac/editundo.png
deleted file mode 100644
index a3bd5e0bf2..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/editundo.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/exportpdf.png b/examples/widgets/richtext/textedit/images/mac/exportpdf.png
deleted file mode 100644
index 9e199407af..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/exportpdf.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/filenew.png b/examples/widgets/richtext/textedit/images/mac/filenew.png
deleted file mode 100644
index d3882c7b3f..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/filenew.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/fileopen.png b/examples/widgets/richtext/textedit/images/mac/fileopen.png
deleted file mode 100644
index fc06c5ec63..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/fileopen.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/fileprint.png b/examples/widgets/richtext/textedit/images/mac/fileprint.png
deleted file mode 100644
index 10ca56c82a..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/fileprint.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/filesave.png b/examples/widgets/richtext/textedit/images/mac/filesave.png
deleted file mode 100644
index e65a29d5f1..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/filesave.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/format-indent-less.png b/examples/widgets/richtext/textedit/images/mac/format-indent-less.png
deleted file mode 100644
index e38074e78b..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/format-indent-less.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/format-indent-more.png b/examples/widgets/richtext/textedit/images/mac/format-indent-more.png
deleted file mode 100644
index 1bdeabd354..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/format-indent-more.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/textbold.png b/examples/widgets/richtext/textedit/images/mac/textbold.png
deleted file mode 100644
index 38400bd1f6..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/textbold.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/textcenter.png b/examples/widgets/richtext/textedit/images/mac/textcenter.png
deleted file mode 100644
index 2ef5b2ee6f..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/textcenter.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/textitalic.png b/examples/widgets/richtext/textedit/images/mac/textitalic.png
deleted file mode 100644
index 0170ee26a6..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/textitalic.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/textjustify.png b/examples/widgets/richtext/textedit/images/mac/textjustify.png
deleted file mode 100644
index 39cd6c1a9d..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/textjustify.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/textleft.png b/examples/widgets/richtext/textedit/images/mac/textleft.png
deleted file mode 100644
index 83a66d5535..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/textleft.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/textright.png b/examples/widgets/richtext/textedit/images/mac/textright.png
deleted file mode 100644
index e7c04645cf..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/textright.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/textunder.png b/examples/widgets/richtext/textedit/images/mac/textunder.png
deleted file mode 100644
index 968bac5e90..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/textunder.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/textundercolor.png b/examples/widgets/richtext/textedit/images/mac/textundercolor.png
deleted file mode 100644
index 30e24e61c3..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/textundercolor.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/zoomin.png b/examples/widgets/richtext/textedit/images/mac/zoomin.png
deleted file mode 100644
index d46f5aff0d..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/zoomin.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/mac/zoomout.png b/examples/widgets/richtext/textedit/images/mac/zoomout.png
deleted file mode 100644
index 46326566d1..0000000000
--- a/examples/widgets/richtext/textedit/images/mac/zoomout.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/checkbox-checked.png b/examples/widgets/richtext/textedit/images/win/checkbox-checked.png
deleted file mode 100644
index a072d7fb5c..0000000000
--- a/examples/widgets/richtext/textedit/images/win/checkbox-checked.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/checkbox.png b/examples/widgets/richtext/textedit/images/win/checkbox.png
deleted file mode 100644
index 4064909712..0000000000
--- a/examples/widgets/richtext/textedit/images/win/checkbox.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/editcopy.png b/examples/widgets/richtext/textedit/images/win/editcopy.png
deleted file mode 100644
index 1121b47d8b..0000000000
--- a/examples/widgets/richtext/textedit/images/win/editcopy.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/editcut.png b/examples/widgets/richtext/textedit/images/win/editcut.png
deleted file mode 100644
index 38e55f7420..0000000000
--- a/examples/widgets/richtext/textedit/images/win/editcut.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/editpaste.png b/examples/widgets/richtext/textedit/images/win/editpaste.png
deleted file mode 100644
index ffab15aaf8..0000000000
--- a/examples/widgets/richtext/textedit/images/win/editpaste.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/editredo.png b/examples/widgets/richtext/textedit/images/win/editredo.png
deleted file mode 100644
index 9d679fe6fc..0000000000
--- a/examples/widgets/richtext/textedit/images/win/editredo.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/editundo.png b/examples/widgets/richtext/textedit/images/win/editundo.png
deleted file mode 100644
index eee23d24a3..0000000000
--- a/examples/widgets/richtext/textedit/images/win/editundo.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/exportpdf.png b/examples/widgets/richtext/textedit/images/win/exportpdf.png
deleted file mode 100644
index ebb44e6b88..0000000000
--- a/examples/widgets/richtext/textedit/images/win/exportpdf.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/filenew.png b/examples/widgets/richtext/textedit/images/win/filenew.png
deleted file mode 100644
index af5d122141..0000000000
--- a/examples/widgets/richtext/textedit/images/win/filenew.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/fileopen.png b/examples/widgets/richtext/textedit/images/win/fileopen.png
deleted file mode 100644
index fc6f17e977..0000000000
--- a/examples/widgets/richtext/textedit/images/win/fileopen.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/fileprint.png b/examples/widgets/richtext/textedit/images/win/fileprint.png
deleted file mode 100644
index ba7c02dc18..0000000000
--- a/examples/widgets/richtext/textedit/images/win/fileprint.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/filesave.png b/examples/widgets/richtext/textedit/images/win/filesave.png
deleted file mode 100644
index 8feec99bee..0000000000
--- a/examples/widgets/richtext/textedit/images/win/filesave.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/format-indent-less.png b/examples/widgets/richtext/textedit/images/win/format-indent-less.png
deleted file mode 100644
index e38074e78b..0000000000
--- a/examples/widgets/richtext/textedit/images/win/format-indent-less.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/format-indent-more.png b/examples/widgets/richtext/textedit/images/win/format-indent-more.png
deleted file mode 100644
index 1bdeabd354..0000000000
--- a/examples/widgets/richtext/textedit/images/win/format-indent-more.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/textbold.png b/examples/widgets/richtext/textedit/images/win/textbold.png
deleted file mode 100644
index 9cbc7138b9..0000000000
--- a/examples/widgets/richtext/textedit/images/win/textbold.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/textcenter.png b/examples/widgets/richtext/textedit/images/win/textcenter.png
deleted file mode 100644
index 11efb4b852..0000000000
--- a/examples/widgets/richtext/textedit/images/win/textcenter.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/textitalic.png b/examples/widgets/richtext/textedit/images/win/textitalic.png
deleted file mode 100644
index b30ce14c14..0000000000
--- a/examples/widgets/richtext/textedit/images/win/textitalic.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/textjustify.png b/examples/widgets/richtext/textedit/images/win/textjustify.png
deleted file mode 100644
index 9de0c88085..0000000000
--- a/examples/widgets/richtext/textedit/images/win/textjustify.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/textleft.png b/examples/widgets/richtext/textedit/images/win/textleft.png
deleted file mode 100644
index 16f80bc325..0000000000
--- a/examples/widgets/richtext/textedit/images/win/textleft.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/textright.png b/examples/widgets/richtext/textedit/images/win/textright.png
deleted file mode 100644
index 16872df62a..0000000000
--- a/examples/widgets/richtext/textedit/images/win/textright.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/textunder.png b/examples/widgets/richtext/textedit/images/win/textunder.png
deleted file mode 100644
index c72eff53fb..0000000000
--- a/examples/widgets/richtext/textedit/images/win/textunder.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/textundercolor.png b/examples/widgets/richtext/textedit/images/win/textundercolor.png
deleted file mode 100644
index 30e24e61c3..0000000000
--- a/examples/widgets/richtext/textedit/images/win/textundercolor.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/zoomin.png b/examples/widgets/richtext/textedit/images/win/zoomin.png
deleted file mode 100644
index 2e586fc7bf..0000000000
--- a/examples/widgets/richtext/textedit/images/win/zoomin.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/images/win/zoomout.png b/examples/widgets/richtext/textedit/images/win/zoomout.png
deleted file mode 100644
index a736d39343..0000000000
--- a/examples/widgets/richtext/textedit/images/win/zoomout.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/richtext/textedit/main.cpp b/examples/widgets/richtext/textedit/main.cpp
deleted file mode 100644
index 256d183811..0000000000
--- a/examples/widgets/richtext/textedit/main.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "textedit.h"
-
-#include <QApplication>
-#include <QCommandLineParser>
-#include <QCommandLineOption>
-#include <QScreen>
-
-int main(int argc, char *argv[])
-{
- Q_INIT_RESOURCE(textedit);
-
- QApplication a(argc, argv);
- QCoreApplication::setOrganizationName("QtProject");
- QCoreApplication::setApplicationName("Rich Text");
- QCoreApplication::setApplicationVersion(QT_VERSION_STR);
- QCommandLineParser parser;
- parser.setApplicationDescription(QCoreApplication::applicationName());
- parser.addHelpOption();
- parser.addVersionOption();
- parser.addPositionalArgument("file", "The file to open.");
- parser.process(a);
-
- TextEdit mw;
-
- const QRect availableGeometry = mw.screen()->availableGeometry();
- mw.resize(availableGeometry.width() / 2, (availableGeometry.height() * 2) / 3);
- mw.move((availableGeometry.width() - mw.width()) / 2,
- (availableGeometry.height() - mw.height()) / 2);
-
- if (!mw.load(parser.positionalArguments().value(0, QLatin1String(":/example.html"))))
- mw.fileNew();
-
- mw.show();
- return a.exec();
-}
diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp
deleted file mode 100644
index 66a3370811..0000000000
--- a/examples/widgets/richtext/textedit/textedit.cpp
+++ /dev/null
@@ -1,897 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "textedit.h"
-
-#include <QActionGroup>
-#include <QApplication>
-#include <QClipboard>
-#include <QColorDialog>
-#include <QComboBox>
-#include <QFontComboBox>
-#include <QFile>
-#include <QFileDialog>
-#include <QFileInfo>
-#include <QFontDatabase>
-#include <QMenu>
-#include <QMenuBar>
-#include <QTextEdit>
-#include <QStatusBar>
-#include <QToolBar>
-#include <QTextCursor>
-#include <QTextDocumentWriter>
-#include <QTextList>
-#include <QtDebug>
-#include <QCloseEvent>
-#include <QMessageBox>
-#include <QMimeData>
-#include <QMimeDatabase>
-#if defined(QT_PRINTSUPPORT_LIB)
-#include <QtPrintSupport/qtprintsupportglobal.h>
-#if QT_CONFIG(printer)
-#if QT_CONFIG(printdialog)
-#include <QPrintDialog>
-#endif
-#include <QPrinter>
-#if QT_CONFIG(printpreviewdialog)
-#include <QPrintPreviewDialog>
-#endif
-#endif
-#endif
-
-#ifdef Q_OS_MAC
-const QString rsrcPath = ":/images/mac";
-#else
-const QString rsrcPath = ":/images/win";
-#endif
-
-TextEdit::TextEdit(QWidget *parent)
- : QMainWindow(parent)
-{
-#ifdef Q_OS_MACOS
- setUnifiedTitleAndToolBarOnMac(true);
-#endif
- setWindowTitle(QCoreApplication::applicationName());
-
- textEdit = new QTextEdit(this);
- connect(textEdit, &QTextEdit::currentCharFormatChanged,
- this, &TextEdit::currentCharFormatChanged);
- connect(textEdit, &QTextEdit::cursorPositionChanged,
- this, &TextEdit::cursorPositionChanged);
- setCentralWidget(textEdit);
-
- setToolButtonStyle(Qt::ToolButtonFollowStyle);
- setupFileActions();
- setupEditActions();
- setupTextActions();
-
- {
- QMenu *helpMenu = menuBar()->addMenu(tr("Help"));
- helpMenu->addAction(tr("About"), this, &TextEdit::about);
- helpMenu->addAction(tr("About &Qt"), qApp, &QApplication::aboutQt);
- }
-
- QFont textFont("Helvetica");
- textFont.setStyleHint(QFont::SansSerif);
- textEdit->setFont(textFont);
- fontChanged(textEdit->font());
- colorChanged(textEdit->textColor());
- alignmentChanged(textEdit->alignment());
-
- auto *document = textEdit->document();
- connect(document, &QTextDocument::modificationChanged,
- actionSave, &QAction::setEnabled);
- connect(document, &QTextDocument::modificationChanged,
- this, &QWidget::setWindowModified);
- connect(document, &QTextDocument::undoAvailable,
- actionUndo, &QAction::setEnabled);
- connect(document, &QTextDocument::redoAvailable,
- actionRedo, &QAction::setEnabled);
-
- setWindowModified(document->isModified());
- actionSave->setEnabled(document->isModified());
- actionUndo->setEnabled(document->isUndoAvailable());
- actionRedo->setEnabled(document->isRedoAvailable());
-
-#ifndef QT_NO_CLIPBOARD
- actionCut->setEnabled(false);
- connect(textEdit, &QTextEdit::copyAvailable, actionCut, &QAction::setEnabled);
- actionCopy->setEnabled(false);
- connect(textEdit, &QTextEdit::copyAvailable, actionCopy, &QAction::setEnabled);
-
- connect(QGuiApplication::clipboard(), &QClipboard::dataChanged,
- this, &TextEdit::clipboardDataChanged);
-#endif
-
- textEdit->setFocus();
- setCurrentFileName(QString());
-
-#ifdef Q_OS_MACOS
- // Use dark text on light background on macOS, also in dark mode.
- QPalette pal = textEdit->palette();
- pal.setColor(QPalette::Base, QColor(Qt::white));
- pal.setColor(QPalette::Text, QColor(Qt::black));
- textEdit->setPalette(pal);
-#endif
-}
-
-void TextEdit::closeEvent(QCloseEvent *e)
-{
- if (maybeSave())
- e->accept();
- else
- e->ignore();
-}
-
-void TextEdit::setupFileActions()
-{
- QToolBar *tb = addToolBar(tr("File Actions"));
- QMenu *menu = menuBar()->addMenu(tr("&File"));
-
- const QIcon newIcon = QIcon::fromTheme("document-new", QIcon(rsrcPath + "/filenew.png"));
- QAction *a = menu->addAction(newIcon, tr("&New"), this, &TextEdit::fileNew);
- tb->addAction(a);
- a->setPriority(QAction::LowPriority);
- a->setShortcut(QKeySequence::New);
-
- const QIcon openIcon = QIcon::fromTheme("document-open", QIcon(rsrcPath + "/fileopen.png"));
- a = menu->addAction(openIcon, tr("&Open..."), this, &TextEdit::fileOpen);
- a->setShortcut(QKeySequence::Open);
- tb->addAction(a);
-
- menu->addSeparator();
-
- const QIcon saveIcon = QIcon::fromTheme("document-save", QIcon(rsrcPath + "/filesave.png"));
- actionSave = menu->addAction(saveIcon, tr("&Save"), this, &TextEdit::fileSave);
- actionSave->setShortcut(QKeySequence::Save);
- actionSave->setEnabled(false);
- tb->addAction(actionSave);
-
- a = menu->addAction(tr("Save &As..."), this, &TextEdit::fileSaveAs);
- a->setPriority(QAction::LowPriority);
- menu->addSeparator();
-
-#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printer)
- const QIcon printIcon = QIcon::fromTheme("document-print", QIcon(rsrcPath + "/fileprint.png"));
- a = menu->addAction(printIcon, tr("&Print..."), this, &TextEdit::filePrint);
- a->setPriority(QAction::LowPriority);
- a->setShortcut(QKeySequence::Print);
- tb->addAction(a);
-
- const QIcon filePrintIcon = QIcon::fromTheme("fileprint", QIcon(rsrcPath + "/fileprint.png"));
- menu->addAction(filePrintIcon, tr("Print Preview..."), this, &TextEdit::filePrintPreview);
-
- const QIcon exportPdfIcon = QIcon::fromTheme("exportpdf", QIcon(rsrcPath + "/exportpdf.png"));
- a = menu->addAction(exportPdfIcon, tr("&Export PDF..."), this, &TextEdit::filePrintPdf);
- a->setPriority(QAction::LowPriority);
- a->setShortcut(Qt::CTRL | Qt::Key_D);
- tb->addAction(a);
-
- menu->addSeparator();
-#endif
-
- a = menu->addAction(tr("&Quit"), this, &QWidget::close);
- a->setShortcut(Qt::CTRL | Qt::Key_Q);
-}
-
-void TextEdit::setupEditActions()
-{
- QToolBar *tb = addToolBar(tr("Edit Actions"));
- QMenu *menu = menuBar()->addMenu(tr("&Edit"));
-
- const QIcon undoIcon = QIcon::fromTheme("edit-undo", QIcon(rsrcPath + "/editundo.png"));
- actionUndo = menu->addAction(undoIcon, tr("&Undo"), textEdit, &QTextEdit::undo);
- actionUndo->setShortcut(QKeySequence::Undo);
- tb->addAction(actionUndo);
-
- const QIcon redoIcon = QIcon::fromTheme("edit-redo", QIcon(rsrcPath + "/editredo.png"));
- actionRedo = menu->addAction(redoIcon, tr("&Redo"), textEdit, &QTextEdit::redo);
- actionRedo->setPriority(QAction::LowPriority);
- actionRedo->setShortcut(QKeySequence::Redo);
- tb->addAction(actionRedo);
- menu->addSeparator();
-
-#ifndef QT_NO_CLIPBOARD
- const QIcon cutIcon = QIcon::fromTheme("edit-cut", QIcon(rsrcPath + "/editcut.png"));
- actionCut = menu->addAction(cutIcon, tr("Cu&t"), textEdit, &QTextEdit::cut);
- actionCut->setPriority(QAction::LowPriority);
- actionCut->setShortcut(QKeySequence::Cut);
- tb->addAction(actionCut);
-
- const QIcon copyIcon = QIcon::fromTheme("edit-copy", QIcon(rsrcPath + "/editcopy.png"));
- actionCopy = menu->addAction(copyIcon, tr("&Copy"), textEdit, &QTextEdit::copy);
- actionCopy->setPriority(QAction::LowPriority);
- actionCopy->setShortcut(QKeySequence::Copy);
- tb->addAction(actionCopy);
-
- const QIcon pasteIcon = QIcon::fromTheme("edit-paste", QIcon(rsrcPath + "/editpaste.png"));
- actionPaste = menu->addAction(pasteIcon, tr("&Paste"), textEdit, &QTextEdit::paste);
- actionPaste->setPriority(QAction::LowPriority);
- actionPaste->setShortcut(QKeySequence::Paste);
- tb->addAction(actionPaste);
- if (const QMimeData *md = QGuiApplication::clipboard()->mimeData())
- actionPaste->setEnabled(md->hasText());
-#endif
-}
-
-void TextEdit::setupTextActions()
-{
- QToolBar *tb = addToolBar(tr("Format Actions"));
- QMenu *menu = menuBar()->addMenu(tr("F&ormat"));
-
- const QIcon boldIcon = QIcon::fromTheme("format-text-bold", QIcon(rsrcPath + "/textbold.png"));
- actionTextBold = menu->addAction(boldIcon, tr("&Bold"), this, &TextEdit::textBold);
- actionTextBold->setShortcut(Qt::CTRL | Qt::Key_B);
- actionTextBold->setPriority(QAction::LowPriority);
- QFont bold;
- bold.setBold(true);
- actionTextBold->setFont(bold);
- tb->addAction(actionTextBold);
- actionTextBold->setCheckable(true);
-
- const QIcon italicIcon = QIcon::fromTheme("format-text-italic", QIcon(rsrcPath + "/textitalic.png"));
- actionTextItalic = menu->addAction(italicIcon, tr("&Italic"), this, &TextEdit::textItalic);
- actionTextItalic->setPriority(QAction::LowPriority);
- actionTextItalic->setShortcut(Qt::CTRL | Qt::Key_I);
- QFont italic;
- italic.setItalic(true);
- actionTextItalic->setFont(italic);
- tb->addAction(actionTextItalic);
- actionTextItalic->setCheckable(true);
-
- const QIcon underlineIcon = QIcon::fromTheme("format-text-underline", QIcon(rsrcPath + "/textunder.png"));
- actionTextUnderline = menu->addAction(underlineIcon, tr("&Underline"), this, &TextEdit::textUnderline);
- actionTextUnderline->setShortcut(Qt::CTRL | Qt::Key_U);
- actionTextUnderline->setPriority(QAction::LowPriority);
- QFont underline;
- underline.setUnderline(true);
- actionTextUnderline->setFont(underline);
- tb->addAction(actionTextUnderline);
- actionTextUnderline->setCheckable(true);
-
- menu->addSeparator();
-
- const QIcon leftIcon = QIcon::fromTheme("format-justify-left", QIcon(rsrcPath + "/textleft.png"));
- actionAlignLeft = new QAction(leftIcon, tr("&Left"), this);
- actionAlignLeft->setShortcut(Qt::CTRL | Qt::Key_L);
- actionAlignLeft->setCheckable(true);
- actionAlignLeft->setPriority(QAction::LowPriority);
- const QIcon centerIcon = QIcon::fromTheme("format-justify-center", QIcon(rsrcPath + "/textcenter.png"));
- actionAlignCenter = new QAction(centerIcon, tr("C&enter"), this);
- actionAlignCenter->setShortcut(Qt::CTRL | Qt::Key_E);
- actionAlignCenter->setCheckable(true);
- actionAlignCenter->setPriority(QAction::LowPriority);
- const QIcon rightIcon = QIcon::fromTheme("format-justify-right", QIcon(rsrcPath + "/textright.png"));
- actionAlignRight = new QAction(rightIcon, tr("&Right"), this);
- actionAlignRight->setShortcut(Qt::CTRL | Qt::Key_R);
- actionAlignRight->setCheckable(true);
- actionAlignRight->setPriority(QAction::LowPriority);
- const QIcon fillIcon = QIcon::fromTheme("format-justify-fill", QIcon(rsrcPath + "/textjustify.png"));
- actionAlignJustify = new QAction(fillIcon, tr("&Justify"), this);
- actionAlignJustify->setShortcut(Qt::CTRL | Qt::Key_J);
- actionAlignJustify->setCheckable(true);
- actionAlignJustify->setPriority(QAction::LowPriority);
- const QIcon indentMoreIcon = QIcon::fromTheme("format-indent-more", QIcon(rsrcPath + "/format-indent-more.png"));
- actionIndentMore = menu->addAction(indentMoreIcon, tr("&Indent"), this, &TextEdit::indent);
- actionIndentMore->setShortcut(Qt::CTRL | Qt::Key_BracketRight);
- actionIndentMore->setPriority(QAction::LowPriority);
- const QIcon indentLessIcon = QIcon::fromTheme("format-indent-less", QIcon(rsrcPath + "/format-indent-less.png"));
- actionIndentLess = menu->addAction(indentLessIcon, tr("&Unindent"), this, &TextEdit::unindent);
- actionIndentLess->setShortcut(Qt::CTRL | Qt::Key_BracketLeft);
- actionIndentLess->setPriority(QAction::LowPriority);
-
- // Make sure the alignLeft is always left of the alignRight
- QActionGroup *alignGroup = new QActionGroup(this);
- connect(alignGroup, &QActionGroup::triggered, this, &TextEdit::textAlign);
-
- if (QGuiApplication::isLeftToRight()) {
- alignGroup->addAction(actionAlignLeft);
- alignGroup->addAction(actionAlignCenter);
- alignGroup->addAction(actionAlignRight);
- } else {
- alignGroup->addAction(actionAlignRight);
- alignGroup->addAction(actionAlignCenter);
- alignGroup->addAction(actionAlignLeft);
- }
- alignGroup->addAction(actionAlignJustify);
-
- tb->addActions(alignGroup->actions());
- menu->addActions(alignGroup->actions());
- tb->addAction(actionIndentMore);
- tb->addAction(actionIndentLess);
- menu->addAction(actionIndentMore);
- menu->addAction(actionIndentLess);
-
- menu->addSeparator();
-
- QPixmap pix(16, 16);
- pix.fill(Qt::black);
- actionTextColor = menu->addAction(pix, tr("&Color..."), this, &TextEdit::textColor);
- tb->addAction(actionTextColor);
-
- const QIcon underlineColorIcon(rsrcPath + "/textundercolor.png");
- actionUnderlineColor = menu->addAction(underlineColorIcon, tr("Underline color..."), this, &TextEdit::underlineColor);
- tb->addAction(actionUnderlineColor);
-
- menu->addSeparator();
-
- const QIcon checkboxIcon = QIcon::fromTheme("status-checkbox-checked", QIcon(rsrcPath + "/checkbox-checked.png"));
- actionToggleCheckState = menu->addAction(checkboxIcon, tr("Chec&ked"), this, &TextEdit::setChecked);
- actionToggleCheckState->setShortcut(Qt::CTRL | Qt::Key_K);
- actionToggleCheckState->setCheckable(true);
- actionToggleCheckState->setPriority(QAction::LowPriority);
- tb->addAction(actionToggleCheckState);
-
- tb = addToolBar(tr("Format Actions"));
- tb->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
- addToolBarBreak(Qt::TopToolBarArea);
- addToolBar(tb);
-
- comboStyle = new QComboBox(tb);
- tb->addWidget(comboStyle);
- comboStyle->addItems({"Standard",
- "Bullet List (Disc)",
- "Bullet List (Circle)",
- "Bullet List (Square)",
- "Task List (Unchecked)",
- "Task List (Checked)",
- "Ordered List (Decimal)",
- "Ordered List (Alpha lower)",
- "Ordered List (Alpha upper)",
- "Ordered List (Roman lower)",
- "Ordered List (Roman upper)",
- "Heading 1",
- "Heading 2",
- "Heading 3",
- "Heading 4",
- "Heading 5",
- "Heading 6"}),
-
- connect(comboStyle, &QComboBox::activated, this, &TextEdit::textStyle);
-
- comboFont = new QFontComboBox(tb);
- tb->addWidget(comboFont);
- connect(comboFont, &QComboBox::textActivated, this, &TextEdit::textFamily);
-
- comboSize = new QComboBox(tb);
- comboSize->setObjectName("comboSize");
- tb->addWidget(comboSize);
- comboSize->setEditable(true);
-
- const QList<int> standardSizes = QFontDatabase::standardSizes();
- for (int size : standardSizes)
- comboSize->addItem(QString::number(size));
- comboSize->setCurrentIndex(standardSizes.indexOf(QApplication::font().pointSize()));
-
- connect(comboSize, &QComboBox::textActivated, this, &TextEdit::textSize);
-}
-
-bool TextEdit::load(const QString &f)
-{
- if (!QFile::exists(f))
- return false;
- QFile file(f);
- if (!file.open(QFile::ReadOnly))
- return false;
-
- QByteArray data = file.readAll();
- QMimeDatabase db;
- const QString &mimeTypeName = db.mimeTypeForFileNameAndData(f, data).name();
- if (mimeTypeName == u"text/html") {
- auto encoding = QStringDecoder::encodingForHtml(data);
- QString str = QStringDecoder(encoding ? *encoding : QStringDecoder::Utf8)(data);
- QUrl fileUrl = f.startsWith(u':') ? QUrl(f) : QUrl::fromLocalFile(f);
- textEdit->document()->setBaseUrl(fileUrl.adjusted(QUrl::RemoveFilename));
- textEdit->setHtml(str);
-#if QT_CONFIG(textmarkdownreader)
- } else if (mimeTypeName == u"text/markdown") {
- textEdit->setMarkdown(QString::fromUtf8(data));
-#endif
- } else {
- textEdit->setPlainText(QString::fromUtf8(data));
- }
-
- setCurrentFileName(f);
- return true;
-}
-
-bool TextEdit::maybeSave()
-{
- if (!textEdit->document()->isModified())
- return true;
-
- const QMessageBox::StandardButton ret =
- QMessageBox::warning(this, QCoreApplication::applicationName(),
- tr("The document has been modified.\n"
- "Do you want to save your changes?"),
- QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
- if (ret == QMessageBox::Save)
- return fileSave();
- if (ret == QMessageBox::Cancel)
- return false;
- return true;
-}
-
-void TextEdit::setCurrentFileName(const QString &fileName)
-{
- this->fileName = fileName;
- textEdit->document()->setModified(false);
-
- QString shownName;
- if (fileName.isEmpty())
- shownName = "untitled.txt";
- else
- shownName = QFileInfo(fileName).fileName();
-
- setWindowTitle(tr("%1[*] - %2").arg(shownName, QCoreApplication::applicationName()));
- setWindowModified(false);
-}
-
-void TextEdit::fileNew()
-{
- if (maybeSave()) {
- textEdit->clear();
- setCurrentFileName({});
- }
-}
-
-void TextEdit::fileOpen()
-{
- QFileDialog fileDialog(this, tr("Open File..."));
- fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
- fileDialog.setFileMode(QFileDialog::ExistingFile);
- fileDialog.setMimeTypeFilters({
-#if QT_CONFIG(texthtmlparser)
- "text/html",
-#endif
-#if QT_CONFIG(textmarkdownreader)
-
- "text/markdown",
-#endif
- "text/plain"});
- if (fileDialog.exec() != QDialog::Accepted)
- return;
- const QString fn = fileDialog.selectedFiles().constFirst();
- if (load(fn))
- statusBar()->showMessage(tr("Opened \"%1\"").arg(QDir::toNativeSeparators(fn)));
- else
- statusBar()->showMessage(tr("Could not open \"%1\"").arg(QDir::toNativeSeparators(fn)));
-}
-
-bool TextEdit::fileSave()
-{
- if (fileName.isEmpty() || fileName.startsWith(u":/"))
- return fileSaveAs();
-
- QTextDocumentWriter writer(fileName);
- bool success = writer.write(textEdit->document());
- if (success) {
- textEdit->document()->setModified(false);
- statusBar()->showMessage(tr("Wrote \"%1\"").arg(QDir::toNativeSeparators(fileName)));
- } else {
- statusBar()->showMessage(tr("Could not write to file \"%1\"")
- .arg(QDir::toNativeSeparators(fileName)));
- }
- return success;
-}
-
-bool TextEdit::fileSaveAs()
-{
- QFileDialog fileDialog(this, tr("Save as..."));
- fileDialog.setAcceptMode(QFileDialog::AcceptSave);
- QStringList mimeTypes{"text/plain",
-#if QT_CONFIG(textodfwriter)
- "application/vnd.oasis.opendocument.text",
-#endif
-#if QT_CONFIG(textmarkdownwriter)
- "text/markdown",
-#endif
- "text/html"};
- fileDialog.setMimeTypeFilters(mimeTypes);
-#if QT_CONFIG(textodfwriter)
- fileDialog.setDefaultSuffix("odt");
-#endif
- if (fileDialog.exec() != QDialog::Accepted)
- return false;
- const QString fn = fileDialog.selectedFiles().constFirst();
- setCurrentFileName(fn);
- return fileSave();
-}
-
-void TextEdit::filePrint()
-{
-#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printdialog)
- QPrinter printer(QPrinter::HighResolution);
- QPrintDialog dlg(&printer, this);
- if (textEdit->textCursor().hasSelection())
- dlg.setOption(QAbstractPrintDialog::PrintSelection);
- dlg.setWindowTitle(tr("Print Document"));
- if (dlg.exec() == QDialog::Accepted)
- textEdit->print(&printer);
-#endif
-}
-
-void TextEdit::filePrintPreview()
-{
-#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printpreviewdialog)
- QPrinter printer(QPrinter::HighResolution);
- QPrintPreviewDialog preview(&printer, this);
- connect(&preview, &QPrintPreviewDialog::paintRequested, textEdit, &QTextEdit::print);
- preview.exec();
-#endif
-}
-
-void TextEdit::filePrintPdf()
-{
-#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printer)
-//! [0]
- QFileDialog fileDialog(this, tr("Export PDF"));
- fileDialog.setAcceptMode(QFileDialog::AcceptSave);
- fileDialog.setMimeTypeFilters(QStringList("application/pdf"));
- fileDialog.setDefaultSuffix("pdf");
- if (fileDialog.exec() != QDialog::Accepted)
- return;
- QString pdfFileName = fileDialog.selectedFiles().constFirst();
- QPrinter printer(QPrinter::HighResolution);
- printer.setOutputFormat(QPrinter::PdfFormat);
- printer.setOutputFileName(pdfFileName);
- textEdit->document()->print(&printer);
- statusBar()->showMessage(tr("Exported \"%1\"")
- .arg(QDir::toNativeSeparators(pdfFileName)));
-//! [0]
-#endif
-}
-
-void TextEdit::textBold()
-{
- QTextCharFormat fmt;
- fmt.setFontWeight(actionTextBold->isChecked() ? QFont::Bold : QFont::Normal);
- mergeFormatOnWordOrSelection(fmt);
-}
-
-void TextEdit::textUnderline()
-{
- QTextCharFormat fmt;
- fmt.setFontUnderline(actionTextUnderline->isChecked());
- mergeFormatOnWordOrSelection(fmt);
-}
-
-void TextEdit::textItalic()
-{
- QTextCharFormat fmt;
- fmt.setFontItalic(actionTextItalic->isChecked());
- mergeFormatOnWordOrSelection(fmt);
-}
-
-void TextEdit::textFamily(const QString &f)
-{
- QTextCharFormat fmt;
- fmt.setFontFamilies({f});
- mergeFormatOnWordOrSelection(fmt);
-}
-
-void TextEdit::textSize(const QString &p)
-{
- qreal pointSize = p.toFloat();
- if (pointSize > 0) {
- QTextCharFormat fmt;
- fmt.setFontPointSize(pointSize);
- mergeFormatOnWordOrSelection(fmt);
- }
-}
-
-void TextEdit::textStyle(int styleIndex)
-{
- QTextCursor cursor = textEdit->textCursor();
- QTextListFormat::Style style = QTextListFormat::ListStyleUndefined;
- QTextBlockFormat::MarkerType marker = QTextBlockFormat::MarkerType::NoMarker;
-
- switch (styleIndex) {
- case 1:
- style = QTextListFormat::ListDisc;
- break;
- case 2:
- style = QTextListFormat::ListCircle;
- break;
- case 3:
- style = QTextListFormat::ListSquare;
- break;
- case 4:
- if (cursor.currentList())
- style = cursor.currentList()->format().style();
- else
- style = QTextListFormat::ListDisc;
- marker = QTextBlockFormat::MarkerType::Unchecked;
- break;
- case 5:
- if (cursor.currentList())
- style = cursor.currentList()->format().style();
- else
- style = QTextListFormat::ListDisc;
- marker = QTextBlockFormat::MarkerType::Checked;
- break;
- case 6:
- style = QTextListFormat::ListDecimal;
- break;
- case 7:
- style = QTextListFormat::ListLowerAlpha;
- break;
- case 8:
- style = QTextListFormat::ListUpperAlpha;
- break;
- case 9:
- style = QTextListFormat::ListLowerRoman;
- break;
- case 10:
- style = QTextListFormat::ListUpperRoman;
- break;
- default:
- break;
- }
-
- cursor.beginEditBlock();
-
- QTextBlockFormat blockFmt = cursor.blockFormat();
-
- if (style == QTextListFormat::ListStyleUndefined) {
- blockFmt.setObjectIndex(-1);
- int headingLevel = styleIndex >= 11 ? styleIndex - 11 + 1 : 0; // H1 to H6, or Standard
- blockFmt.setHeadingLevel(headingLevel);
- cursor.setBlockFormat(blockFmt);
-
- int sizeAdjustment = headingLevel ? 4 - headingLevel : 0; // H1 to H6: +3 to -2
- QTextCharFormat fmt;
- fmt.setFontWeight(headingLevel ? QFont::Bold : QFont::Normal);
- fmt.setProperty(QTextFormat::FontSizeAdjustment, sizeAdjustment);
- cursor.select(QTextCursor::LineUnderCursor);
- cursor.mergeCharFormat(fmt);
- textEdit->mergeCurrentCharFormat(fmt);
- } else {
- blockFmt.setMarker(marker);
- cursor.setBlockFormat(blockFmt);
- QTextListFormat listFmt;
- if (cursor.currentList()) {
- listFmt = cursor.currentList()->format();
- } else {
- listFmt.setIndent(blockFmt.indent() + 1);
- blockFmt.setIndent(0);
- cursor.setBlockFormat(blockFmt);
- }
- listFmt.setStyle(style);
- cursor.createList(listFmt);
- }
-
- cursor.endEditBlock();
-}
-
-void TextEdit::textColor()
-{
- QColor col = QColorDialog::getColor(textEdit->textColor(), this);
- if (!col.isValid())
- return;
- QTextCharFormat fmt;
- fmt.setForeground(col);
- mergeFormatOnWordOrSelection(fmt);
- colorChanged(col);
-}
-
-void TextEdit::underlineColor()
-{
- QColor col = QColorDialog::getColor(Qt::black, this);
- if (!col.isValid())
- return;
- QTextCharFormat fmt;
- fmt.setUnderlineColor(col);
- mergeFormatOnWordOrSelection(fmt);
- colorChanged(col);
-}
-
-void TextEdit::textAlign(QAction *a)
-{
- if (a == actionAlignLeft)
- textEdit->setAlignment(Qt::AlignLeft | Qt::AlignAbsolute);
- else if (a == actionAlignCenter)
- textEdit->setAlignment(Qt::AlignHCenter);
- else if (a == actionAlignRight)
- textEdit->setAlignment(Qt::AlignRight | Qt::AlignAbsolute);
- else if (a == actionAlignJustify)
- textEdit->setAlignment(Qt::AlignJustify);
-}
-
-void TextEdit::setChecked(bool checked)
-{
- textStyle(checked ? 5 : 4);
-}
-
-void TextEdit::indent()
-{
- modifyIndentation(1);
-}
-
-void TextEdit::unindent()
-{
- modifyIndentation(-1);
-}
-
-void TextEdit::modifyIndentation(int amount)
-{
- QTextCursor cursor = textEdit->textCursor();
- cursor.beginEditBlock();
- if (cursor.currentList()) {
- QTextListFormat listFmt = cursor.currentList()->format();
- // See whether the line above is the list we want to move this item into,
- // or whether we need a new list.
- QTextCursor above(cursor);
- above.movePosition(QTextCursor::Up);
- if (above.currentList() && listFmt.indent() + amount == above.currentList()->format().indent()) {
- above.currentList()->add(cursor.block());
- } else {
- listFmt.setIndent(listFmt.indent() + amount);
- cursor.createList(listFmt);
- }
- } else {
- QTextBlockFormat blockFmt = cursor.blockFormat();
- blockFmt.setIndent(blockFmt.indent() + amount);
- cursor.setBlockFormat(blockFmt);
- }
- cursor.endEditBlock();
-}
-
-void TextEdit::currentCharFormatChanged(const QTextCharFormat &format)
-{
- fontChanged(format.font());
- colorChanged(format.foreground().color());
-}
-
-void TextEdit::cursorPositionChanged()
-{
- alignmentChanged(textEdit->alignment());
- QTextList *list = textEdit->textCursor().currentList();
- if (list) {
- switch (list->format().style()) {
- case QTextListFormat::ListDisc:
- comboStyle->setCurrentIndex(1);
- break;
- case QTextListFormat::ListCircle:
- comboStyle->setCurrentIndex(2);
- break;
- case QTextListFormat::ListSquare:
- comboStyle->setCurrentIndex(3);
- break;
- case QTextListFormat::ListDecimal:
- comboStyle->setCurrentIndex(6);
- break;
- case QTextListFormat::ListLowerAlpha:
- comboStyle->setCurrentIndex(7);
- break;
- case QTextListFormat::ListUpperAlpha:
- comboStyle->setCurrentIndex(8);
- break;
- case QTextListFormat::ListLowerRoman:
- comboStyle->setCurrentIndex(9);
- break;
- case QTextListFormat::ListUpperRoman:
- comboStyle->setCurrentIndex(10);
- break;
- default:
- comboStyle->setCurrentIndex(-1);
- break;
- }
- switch (textEdit->textCursor().block().blockFormat().marker()) {
- case QTextBlockFormat::MarkerType::NoMarker:
- actionToggleCheckState->setChecked(false);
- break;
- case QTextBlockFormat::MarkerType::Unchecked:
- comboStyle->setCurrentIndex(4);
- actionToggleCheckState->setChecked(false);
- break;
- case QTextBlockFormat::MarkerType::Checked:
- comboStyle->setCurrentIndex(5);
- actionToggleCheckState->setChecked(true);
- break;
- }
- } else {
- int headingLevel = textEdit->textCursor().blockFormat().headingLevel();
- comboStyle->setCurrentIndex(headingLevel ? headingLevel + 10 : 0);
- }
-}
-
-void TextEdit::clipboardDataChanged()
-{
-#ifndef QT_NO_CLIPBOARD
- if (const QMimeData *md = QGuiApplication::clipboard()->mimeData())
- actionPaste->setEnabled(md->hasText());
-#endif
-}
-
-void TextEdit::about()
-{
- QMessageBox::about(this, tr("About"), tr("This example demonstrates Qt's "
- "rich text editing facilities in action, providing an example "
- "document for you to experiment with."));
-}
-
-void TextEdit::mergeFormatOnWordOrSelection(const QTextCharFormat &format)
-{
- QTextCursor cursor = textEdit->textCursor();
- if (!cursor.hasSelection())
- cursor.select(QTextCursor::WordUnderCursor);
- cursor.mergeCharFormat(format);
- textEdit->mergeCurrentCharFormat(format);
-}
-
-void TextEdit::fontChanged(const QFont &f)
-{
- comboFont->setCurrentIndex(comboFont->findText(QFontInfo(f).family()));
- comboSize->setCurrentIndex(comboSize->findText(QString::number(f.pointSize())));
- actionTextBold->setChecked(f.bold());
- actionTextItalic->setChecked(f.italic());
- actionTextUnderline->setChecked(f.underline());
-}
-
-void TextEdit::colorChanged(const QColor &c)
-{
- QPixmap pix(16, 16);
- pix.fill(c);
- actionTextColor->setIcon(pix);
-}
-
-void TextEdit::alignmentChanged(Qt::Alignment a)
-{
- if (a.testFlag(Qt::AlignLeft))
- actionAlignLeft->setChecked(true);
- else if (a.testFlag(Qt::AlignHCenter))
- actionAlignCenter->setChecked(true);
- else if (a.testFlag(Qt::AlignRight))
- actionAlignRight->setChecked(true);
- else if (a.testFlag(Qt::AlignJustify))
- actionAlignJustify->setChecked(true);
-}
-
diff --git a/examples/widgets/richtext/textedit/textedit.h b/examples/widgets/richtext/textedit/textedit.h
deleted file mode 100644
index 6b95891d31..0000000000
--- a/examples/widgets/richtext/textedit/textedit.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef TEXTEDIT_H
-#define TEXTEDIT_H
-
-#include <QMainWindow>
-
-QT_BEGIN_NAMESPACE
-class QAction;
-class QComboBox;
-class QFontComboBox;
-class QTextEdit;
-class QTextCharFormat;
-class QMenu;
-class QPrinter;
-QT_END_NAMESPACE
-
-class TextEdit : public QMainWindow
-{
- Q_OBJECT
-
-public:
- TextEdit(QWidget *parent = nullptr);
-
- bool load(const QString &f);
-
-public slots:
- void fileNew();
-
-protected:
- void closeEvent(QCloseEvent *e) override;
-
-private slots:
- void fileOpen();
- bool fileSave();
- bool fileSaveAs();
- void filePrint();
- void filePrintPreview();
- void filePrintPdf();
-
- void textBold();
- void textUnderline();
- void textItalic();
- void textFamily(const QString &f);
- void textSize(const QString &p);
- void textStyle(int styleIndex);
- void textColor();
- void underlineColor();
- void textAlign(QAction *a);
- void setChecked(bool checked);
- void indent();
- void unindent();
-
- void currentCharFormatChanged(const QTextCharFormat &format);
- void cursorPositionChanged();
-
- void clipboardDataChanged();
- void about();
-
-private:
- void setupFileActions();
- void setupEditActions();
- void setupTextActions();
- bool maybeSave();
- void setCurrentFileName(const QString &fileName);
- void modifyIndentation(int amount);
-
- void mergeFormatOnWordOrSelection(const QTextCharFormat &format);
- void fontChanged(const QFont &f);
- void colorChanged(const QColor &c);
- void alignmentChanged(Qt::Alignment a);
-
- QAction *actionSave;
- QAction *actionTextBold;
- QAction *actionTextUnderline;
- QAction *actionTextItalic;
- QAction *actionTextColor;
- QAction *actionUnderlineColor;
- QAction *actionAlignLeft;
- QAction *actionAlignCenter;
- QAction *actionAlignRight;
- QAction *actionAlignJustify;
- QAction *actionIndentLess;
- QAction *actionIndentMore;
- QAction *actionToggleCheckState;
- QAction *actionUndo;
- QAction *actionRedo;
-#ifndef QT_NO_CLIPBOARD
- QAction *actionCut;
- QAction *actionCopy;
- QAction *actionPaste;
-#endif
-
- QComboBox *comboStyle;
- QFontComboBox *comboFont;
- QComboBox *comboSize;
-
- QString fileName;
- QTextEdit *textEdit;
-};
-
-#endif // TEXTEDIT_H
diff --git a/examples/widgets/richtext/textedit/textedit.pro b/examples/widgets/richtext/textedit/textedit.pro
deleted file mode 100644
index b7a2155b0b..0000000000
--- a/examples/widgets/richtext/textedit/textedit.pro
+++ /dev/null
@@ -1,22 +0,0 @@
-QT += widgets
-requires(qtConfig(filedialog))
-qtHaveModule(printsupport): QT += printsupport
-
-TEMPLATE = app
-TARGET = textedit
-
-HEADERS = textedit.h
-SOURCES = textedit.cpp \
- main.cpp
-
-RESOURCES += textedit.qrc
-build_all:!build_pass {
- CONFIG -= build_all
- CONFIG += release
-}
-
-EXAMPLE_FILES = textedit.qdoc
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/widgets/richtext/textedit
-INSTALLS += target
diff --git a/examples/widgets/richtext/textedit/textedit.qdoc b/examples/widgets/richtext/textedit/textedit.qdoc
deleted file mode 100644
index ff65043db6..0000000000
--- a/examples/widgets/richtext/textedit/textedit.qdoc
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*! \page textedit-example.html
-
- \ingroup examples
- \title Text Edit Example
-
- \brief This example displays a text editor with the user interface written
- in pure C++.
-
- A similar example which uses Qt Designer to produce the user
- interface is in the \l {Qt Designer Manual}.
-
-
- See \c{$QTDIR/examples/textedit} for the source code.
-
-*/
-
-
diff --git a/examples/widgets/richtext/textedit/textedit.qrc b/examples/widgets/richtext/textedit/textedit.qrc
deleted file mode 100644
index a30d50fdbf..0000000000
--- a/examples/widgets/richtext/textedit/textedit.qrc
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/">
- <file>images/logo32.png</file>
- <file>images/mac/checkbox.png</file>
- <file>images/mac/checkbox-checked.png</file>
- <file>images/mac/editcopy.png</file>
- <file>images/mac/editcut.png</file>
- <file>images/mac/editpaste.png</file>
- <file>images/mac/editredo.png</file>
- <file>images/mac/editundo.png</file>
- <file>images/mac/exportpdf.png</file>
- <file>images/mac/filenew.png</file>
- <file>images/mac/fileopen.png</file>
- <file>images/mac/fileprint.png</file>
- <file>images/mac/filesave.png</file>
- <file>images/mac/format-indent-less.png</file>
- <file>images/mac/format-indent-more.png</file>
- <file>images/mac/textbold.png</file>
- <file>images/mac/textcenter.png</file>
- <file>images/mac/textitalic.png</file>
- <file>images/mac/textjustify.png</file>
- <file>images/mac/textleft.png</file>
- <file>images/mac/textright.png</file>
- <file>images/mac/textunder.png</file>
- <file>images/mac/textundercolor.png</file>
- <file>images/mac/zoomin.png</file>
- <file>images/mac/zoomout.png</file>
- <file>images/win/checkbox.png</file>
- <file>images/win/checkbox-checked.png</file>
- <file>images/win/editcopy.png</file>
- <file>images/win/editcut.png</file>
- <file>images/win/editpaste.png</file>
- <file>images/win/editredo.png</file>
- <file>images/win/editundo.png</file>
- <file>images/win/exportpdf.png</file>
- <file>images/win/filenew.png</file>
- <file>images/win/fileopen.png</file>
- <file>images/win/fileprint.png</file>
- <file>images/win/filesave.png</file>
- <file>images/win/format-indent-less.png</file>
- <file>images/win/format-indent-more.png</file>
- <file>images/win/textbold.png</file>
- <file>images/win/textcenter.png</file>
- <file>images/win/textitalic.png</file>
- <file>images/win/textjustify.png</file>
- <file>images/win/textleft.png</file>
- <file>images/win/textright.png</file>
- <file>images/win/textunder.png</file>
- <file>images/win/textundercolor.png</file>
- <file>images/win/zoomin.png</file>
- <file>images/win/zoomout.png</file>
- <file>example.html</file>
-</qresource>
-</RCC>