Add undo and redo icons to toolbar
This commit is contained in:
BIN
images/redo.png
Normal file
BIN
images/redo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
images/undo.png
Normal file
BIN
images/undo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -284,11 +284,18 @@ void MainWindow::createActions()
|
||||
QToolBar *editToolBar = addToolBar(tr("Edit"));
|
||||
editToolBar->setObjectName("editToolBar");
|
||||
|
||||
const QIcon undoIcon = QIcon::fromTheme("edit-undo", QIcon(":/images/undo.png"));
|
||||
QAction *undoAction = m_textWidget->document()->undoStack()->createUndoAction(this, tr("&Undo"));
|
||||
undoAction->setIcon(undoIcon);
|
||||
editMenu->addAction(undoAction);
|
||||
editToolBar->addAction(undoAction);
|
||||
undoAction->setShortcuts(QKeySequence::Undo);
|
||||
|
||||
const QIcon redoIcon = QIcon::fromTheme("edit-redo", QIcon(":/images/redo.png"));
|
||||
QAction *redoAction = m_textWidget->document()->undoStack()->createRedoAction(this, tr("&Redo"));
|
||||
redoAction->setIcon(redoIcon);
|
||||
editMenu->addAction(redoAction);
|
||||
editToolBar->addAction(redoAction);
|
||||
redoAction->setShortcuts(QKeySequence::Redo);
|
||||
|
||||
editMenu->addSeparator();
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
<file>images/cut.png</file>
|
||||
<file>images/new.png</file>
|
||||
<file>images/open.png</file>
|
||||
<file>images/redo.png</file>
|
||||
<file>images/paste.png</file>
|
||||
<file>images/save.png</file>
|
||||
<file>images/undo.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Reference in New Issue
Block a user