diff options
author | Nico Vertriest <nico.vertriest@qt.io> | 2017-11-13 11:54:48 +0100 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2017-12-18 13:39:28 +0000 |
commit | 51a956366f5f39799759d317e675da11a09744c5 (patch) | |
tree | e8165e69ebd131d615e258efa64e1aea476af372 /examples/widgets/tutorials/notepad | |
parent | 3dd030863435e058468df66c696e1608b71e1fd2 (diff) |
Doc: move notepad example to qtbase and improve it
- Edited gettingstartedqt.qdoc
- update .pro files
- replaced snippet statements by \quotefromfile
- removed second version of notepad.h and notepad.cpp
that were made only for quoting snippets
(\quotefromfile reads from the program code)
- show current filename in header of window
- added checking routine on filename in Save method
Task-number: QTBUG-63984
Change-Id: I5298d761763a4dfeb705a1d9b77354be853ada88
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/widgets/tutorials/notepad')
21 files changed, 592 insertions, 0 deletions
diff --git a/examples/widgets/tutorials/notepad/images/copy.png b/examples/widgets/tutorials/notepad/images/copy.png Binary files differnew file mode 100644 index 0000000000..cb3442c04c --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/copy.png diff --git a/examples/widgets/tutorials/notepad/images/create.png b/examples/widgets/tutorials/notepad/images/create.png Binary files differnew file mode 100644 index 0000000000..fdfd4b438a --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/create.png diff --git a/examples/widgets/tutorials/notepad/images/cut.png b/examples/widgets/tutorials/notepad/images/cut.png Binary files differnew file mode 100644 index 0000000000..74b15301ff --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/cut.png diff --git a/examples/widgets/tutorials/notepad/images/edit_redo.png b/examples/widgets/tutorials/notepad/images/edit_redo.png Binary files differnew file mode 100644 index 0000000000..8a7725463c --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/edit_redo.png diff --git a/examples/widgets/tutorials/notepad/images/edit_undo.png b/examples/widgets/tutorials/notepad/images/edit_undo.png Binary files differnew file mode 100644 index 0000000000..852f5e3b29 --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/edit_undo.png diff --git a/examples/widgets/tutorials/notepad/images/exit.png b/examples/widgets/tutorials/notepad/images/exit.png Binary files differnew file mode 100644 index 0000000000..677d4deef2 --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/exit.png diff --git a/examples/widgets/tutorials/notepad/images/font.png b/examples/widgets/tutorials/notepad/images/font.png Binary files differnew file mode 100644 index 0000000000..925e501c03 --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/font.png diff --git a/examples/widgets/tutorials/notepad/images/info.png b/examples/widgets/tutorials/notepad/images/info.png Binary files differnew file mode 100644 index 0000000000..9731212c4f --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/info.png diff --git a/examples/widgets/tutorials/notepad/images/new.png b/examples/widgets/tutorials/notepad/images/new.png Binary files differnew file mode 100644 index 0000000000..b24edc5d0c --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/new.png diff --git a/examples/widgets/tutorials/notepad/images/open.png b/examples/widgets/tutorials/notepad/images/open.png Binary files differnew file mode 100644 index 0000000000..7b052edf5a --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/open.png diff --git a/examples/widgets/tutorials/notepad/images/paste.png b/examples/widgets/tutorials/notepad/images/paste.png Binary files differnew file mode 100644 index 0000000000..c50dbd95b2 --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/paste.png diff --git a/examples/widgets/tutorials/notepad/images/pencil.png b/examples/widgets/tutorials/notepad/images/pencil.png Binary files differnew file mode 100644 index 0000000000..a9c5e5482a --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/pencil.png diff --git a/examples/widgets/tutorials/notepad/images/print.png b/examples/widgets/tutorials/notepad/images/print.png Binary files differnew file mode 100644 index 0000000000..0cd3f28bd8 --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/print.png diff --git a/examples/widgets/tutorials/notepad/images/save.png b/examples/widgets/tutorials/notepad/images/save.png Binary files differnew file mode 100644 index 0000000000..e65a29d5f1 --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/save.png diff --git a/examples/widgets/tutorials/notepad/images/save_as.png b/examples/widgets/tutorials/notepad/images/save_as.png Binary files differnew file mode 100644 index 0000000000..6040574322 --- /dev/null +++ b/examples/widgets/tutorials/notepad/images/save_as.png diff --git a/examples/widgets/tutorials/notepad/main.cpp b/examples/widgets/tutorials/notepad/main.cpp new file mode 100644 index 0000000000..20bcdaa7df --- /dev/null +++ b/examples/widgets/tutorials/notepad/main.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation 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 "notepad.h" +#include <QApplication> + +int main(int argc, char *argv[]) +{ + QApplication EditorApp(argc, argv); + Notepad Editor; + Editor.show(); + + return EditorApp.exec(); +} diff --git a/examples/widgets/tutorials/notepad/notepad.cpp b/examples/widgets/tutorials/notepad/notepad.cpp new file mode 100644 index 0000000000..b4f6cf7f8f --- /dev/null +++ b/examples/widgets/tutorials/notepad/notepad.cpp @@ -0,0 +1,182 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation 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 <QFile> +#include <QFileDialog> +#include <QTextStream> +#include <QMessageBox> +#include <QPrintDialog> +#include <QPrinter> +#include <QFont> +#include <QFontDialog> + +#include "notepad.h" +#include "ui_notepad.h" + +Notepad::Notepad(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::Notepad) +{ + ui->setupUi(this); + this->setCentralWidget(ui->textEdit); +} + +Notepad::~Notepad() +{ + delete ui; +} + +void Notepad::on_actionNew_triggered() +{ + currentFile.clear(); + ui->textEdit->setText(QString()); +} + +void Notepad::on_actionOpen_triggered() +{ + QString fileName = QFileDialog::getOpenFileName(this, "Open the file"); + QFile file(fileName); + currentFile = fileName; + if (!file.open(QIODevice::ReadOnly | QFile::Text)) { + QMessageBox::warning(this, "Warning", "Cannot open file: " + file.errorString()); + return; + } + setWindowTitle(fileName); + QTextStream in(&file); + QString text = in.readAll(); + ui->textEdit->setText(text); + file.close(); +} + +void Notepad::on_actionSave_triggered() +{ + QString fileName; + // If we don't have a filename from before, get one. + if (currentFile.isEmpty()) { + fileName = QFileDialog::getSaveFileName(this, "Save"); + currentFile = fileName; + } else { + fileName = currentFile; + } + QFile file(fileName); + if (!file.open(QIODevice::WriteOnly | QFile::Text)) { + QMessageBox::warning(this, "Warning", "Cannot save file: " + file.errorString()); + return; + } + setWindowTitle(fileName); + QTextStream out(&file); + QString text = ui->textEdit->toPlainText(); + out << text; + file.close(); +} + +void Notepad::on_actionSave_as_triggered() +{ + QString fileName = QFileDialog::getSaveFileName(this, "Save as"); + QFile file(fileName); + + if (!file.open(QFile::WriteOnly | QFile::Text)) { + QMessageBox::warning(this, "Warning", "Cannot save file: " + file.errorString()); + return; + } + currentFile = fileName; + setWindowTitle(fileName); + QTextStream out(&file); + QString text = ui->textEdit->toPlainText(); + out << text; + file.close(); +} + +void Notepad::on_actionPrint_triggered() +{ + QPrinter printDev; + QPrintDialog dialog(&printDev, this); + if (dialog.exec() == QDialog::Rejected) + return; + ui->textEdit->print(&printDev); +} + +void Notepad::on_actionExit_triggered() +{ + QCoreApplication::quit(); +} + +void Notepad::on_actionCopy_triggered() +{ + ui->textEdit->copy(); +} + +void Notepad::on_actionCut_triggered() +{ + ui->textEdit->cut(); +} + +void Notepad::on_actionPaste_triggered() +{ + ui->textEdit->paste(); +} + +void Notepad::on_actionUndo_triggered() +{ + ui->textEdit->undo(); +} + +void Notepad::on_actionRedo_triggered() +{ + ui->textEdit->redo(); +} + +void Notepad::on_actionFont_triggered() +{ + bool fontSelected; + QFont font = QFontDialog::getFont(&fontSelected, this); + if (fontSelected) + ui->textEdit->setFont(font); +} diff --git a/examples/widgets/tutorials/notepad/notepad.h b/examples/widgets/tutorials/notepad/notepad.h new file mode 100644 index 0000000000..f688df45ac --- /dev/null +++ b/examples/widgets/tutorials/notepad/notepad.h @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation 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 NOTEPAD_H +#define NOTEPAD_H + +//! [all] +//! [1] +#include <QMainWindow> +//! [1] + +//! [2] +QT_BEGIN_NAMESPACE +namespace Ui { +class Notepad; +} +QT_END_NAMESPACE +//! [2] + +//! [3] +class Notepad : public QMainWindow +{ + Q_OBJECT +//! [3] + +//! [4] +public: + explicit Notepad(QWidget *parent = 0); +//! [4] +//! [5] + ~Notepad(); +//! [5] + +private slots: + void on_actionNew_triggered(); + + void on_actionOpen_triggered(); + + void on_actionSave_triggered(); + + void on_actionSave_as_triggered(); + + void on_actionPrint_triggered(); + + void on_actionExit_triggered(); + + void on_actionCopy_triggered(); + + void on_actionCut_triggered(); + + void on_actionPaste_triggered(); + + void on_actionUndo_triggered(); + + void on_actionRedo_triggered(); + + void on_actionFont_triggered(); + +//! [6] +private: + Ui::Notepad *ui; + QString currentFile; +//! [6] +}; +//! [all] + +#endif // NOTEPAD_H diff --git a/examples/widgets/tutorials/notepad/notepad.pro b/examples/widgets/tutorials/notepad/notepad.pro new file mode 100644 index 0000000000..7369dbc991 --- /dev/null +++ b/examples/widgets/tutorials/notepad/notepad.pro @@ -0,0 +1,20 @@ +TEMPLATE = app +TARGET = notepad + +QT += printsupport + +SOURCES += \ + main.cpp\ + notepad.cpp + +HEADERS += notepad.h + +FORMS += notepad.ui + +RESOURCES += \ + notepad.qrc + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/notepad +INSTALLS += target + diff --git a/examples/widgets/tutorials/notepad/notepad.qrc b/examples/widgets/tutorials/notepad/notepad.qrc new file mode 100644 index 0000000000..ec11679f13 --- /dev/null +++ b/examples/widgets/tutorials/notepad/notepad.qrc @@ -0,0 +1,19 @@ +<RCC> + <qresource prefix="/"> + <file>images/copy.png</file> + <file>images/create.png</file> + <file>images/cut.png</file> + <file>images/edit_redo.png</file> + <file>images/edit_undo.png</file> + <file>images/exit.png</file> + <file>images/font.png</file> + <file>images/info.png</file> + <file>images/new.png</file> + <file>images/open.png</file> + <file>images/paste.png</file> + <file>images/pencil.png</file> + <file>images/print.png</file> + <file>images/save.png</file> + <file>images/save_as.png</file> + </qresource> +</RCC> diff --git a/examples/widgets/tutorials/notepad/notepad.ui b/examples/widgets/tutorials/notepad/notepad.ui new file mode 100644 index 0000000000..d197a95fe7 --- /dev/null +++ b/examples/widgets/tutorials/notepad/notepad.ui @@ -0,0 +1,196 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Notepad</class> + <widget class="QMainWindow" name="Notepad"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>524</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>Notepad</string> + </property> + <widget class="QWidget" name="centralWidget"> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QTextEdit" name="textEdit"/> + </item> + </layout> + </widget> + <widget class="QMenuBar" name="menuBar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>524</width> + <height>25</height> + </rect> + </property> + <widget class="QMenu" name="menuFile"> + <property name="title"> + <string>File</string> + </property> + <addaction name="actionNew"/> + <addaction name="actionOpen"/> + <addaction name="actionSave"/> + <addaction name="actionSave_as"/> + <addaction name="actionPrint"/> + <addaction name="separator"/> + <addaction name="actionExit"/> + </widget> + <widget class="QMenu" name="menuEdit"> + <property name="title"> + <string>Edit</string> + </property> + <addaction name="actionCopy"/> + <addaction name="actionCut"/> + <addaction name="actionPaste"/> + <addaction name="separator"/> + <addaction name="actionUndo"/> + <addaction name="actionRedo"/> + <addaction name="actionFont"/> + </widget> + <addaction name="menuFile"/> + <addaction name="menuEdit"/> + </widget> + <widget class="QToolBar" name="mainToolBar"> + <attribute name="toolBarArea"> + <enum>TopToolBarArea</enum> + </attribute> + <attribute name="toolBarBreak"> + <bool>false</bool> + </attribute> + <addaction name="actionNew"/> + <addaction name="actionOpen"/> + <addaction name="actionSave"/> + <addaction name="actionSave_as"/> + <addaction name="actionPrint"/> + <addaction name="separator"/> + <addaction name="actionCopy"/> + <addaction name="actionCut"/> + <addaction name="actionPaste"/> + <addaction name="actionUndo"/> + <addaction name="actionRedo"/> + <addaction name="actionFont"/> + <addaction name="separator"/> + <addaction name="actionExit"/> + </widget> + <widget class="QStatusBar" name="statusBar"/> + <action name="actionNew"> + <property name="icon"> + <iconset resource="notepad.qrc"> + <normaloff>:/images/new.png</normaloff>:/images/new.png</iconset> + </property> + <property name="text"> + <string>New</string> + </property> + </action> + <action name="actionOpen"> + <property name="icon"> + <iconset> + <normaloff>:/images/open.png</normaloff>:/images/open.png</iconset> + </property> + <property name="text"> + <string>Open</string> + </property> + </action> + <action name="actionSave"> + <property name="icon"> + <iconset> + <normaloff>:/images/save.png</normaloff>:/images/save.png</iconset> + </property> + <property name="text"> + <string>Save</string> + </property> + </action> + <action name="actionSave_as"> + <property name="icon"> + <iconset> + <normaloff>:/images/save_as.png</normaloff>:/images/save_as.png</iconset> + </property> + <property name="text"> + <string>Save as</string> + </property> + </action> + <action name="actionPrint"> + <property name="icon"> + <iconset> + <normaloff>:/images/print.png</normaloff>:/images/print.png</iconset> + </property> + <property name="text"> + <string>Print</string> + </property> + </action> + <action name="actionExit"> + <property name="icon"> + <iconset> + <normaloff>:/images/exit.png</normaloff>:/images/exit.png</iconset> + </property> + <property name="text"> + <string>Exit</string> + </property> + </action> + <action name="actionCopy"> + <property name="icon"> + <iconset> + <normaloff>:/images/copy.png</normaloff>:/images/copy.png</iconset> + </property> + <property name="text"> + <string>Copy</string> + </property> + </action> + <action name="actionCut"> + <property name="icon"> + <iconset> + <normaloff>:/images/cut.png</normaloff>:/images/cut.png</iconset> + </property> + <property name="text"> + <string>Cut</string> + </property> + </action> + <action name="actionPaste"> + <property name="icon"> + <iconset> + <normaloff>:/images/paste.png</normaloff>:/images/paste.png</iconset> + </property> + <property name="text"> + <string>Paste</string> + </property> + </action> + <action name="actionUndo"> + <property name="icon"> + <iconset> + <normaloff>:/images/edit_undo.png</normaloff>:/images/edit_undo.png</iconset> + </property> + <property name="text"> + <string>Undo</string> + </property> + </action> + <action name="actionRedo"> + <property name="icon"> + <iconset> + <normaloff>:/images/edit_redo.png</normaloff>:/images/edit_redo.png</iconset> + </property> + <property name="text"> + <string>Redo</string> + </property> + </action> + <action name="actionFont"> + <property name="icon"> + <iconset> + <normaloff>:/images/font.png</normaloff>:/images/font.png</iconset> + </property> + <property name="text"> + <string>Font</string> + </property> + </action> + </widget> + <layoutdefault spacing="6" margin="11"/> + <resources> + <include location="notepad.qrc"/> + </resources> + <connections/> +</ui> |