diff options
Diffstat (limited to 'examples/tools')
-rw-r--r-- | examples/tools/codecs/mainwindow.cpp | 4 | ||||
-rw-r--r-- | examples/tools/plugandpaint/mainwindow.cpp | 6 | ||||
-rw-r--r-- | examples/tools/settingseditor/mainwindow.cpp | 4 | ||||
-rw-r--r-- | examples/tools/undoframework/mainwindow.cpp | 8 |
4 files changed, 10 insertions, 12 deletions
diff --git a/examples/tools/codecs/mainwindow.cpp b/examples/tools/codecs/mainwindow.cpp index 1e6fa69..5d3b7ac 100644 --- a/examples/tools/codecs/mainwindow.cpp +++ b/examples/tools/codecs/mainwindow.cpp @@ -156,7 +156,7 @@ void MainWindow::findCodecs() void MainWindow::createActions() { openAct = new QAction(tr("&Open..."), this); - openAct->setShortcut(tr("Ctrl+O")); + openAct->setShortcuts(QKeySequence::Open); connect(openAct, SIGNAL(triggered()), this, SLOT(open())); foreach (QTextCodec *codec, codecs) { @@ -169,7 +169,7 @@ void MainWindow::createActions() } exitAct = new QAction(tr("E&xit"), this); - exitAct->setShortcut(tr("Ctrl+Q")); + exitAct->setShortcuts(QKeySequence::Quit); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); aboutAct = new QAction(tr("&About"), this); diff --git a/examples/tools/plugandpaint/mainwindow.cpp b/examples/tools/plugandpaint/mainwindow.cpp index 224bc71..f61359b 100644 --- a/examples/tools/plugandpaint/mainwindow.cpp +++ b/examples/tools/plugandpaint/mainwindow.cpp @@ -179,15 +179,15 @@ void MainWindow::aboutPlugins() void MainWindow::createActions() { openAct = new QAction(tr("&Open..."), this); - openAct->setShortcut(tr("Ctrl+O")); + openAct->setShortcuts(QKeySequence::Open); connect(openAct, SIGNAL(triggered()), this, SLOT(open())); saveAsAct = new QAction(tr("&Save As..."), this); - saveAsAct->setShortcut(tr("Ctrl+S")); + saveAsAct->setShortcuts(QKeySequence::SaveAs); connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs())); exitAct = new QAction(tr("E&xit"), this); - exitAct->setShortcut(tr("Ctrl+Q")); + exitAct->setShortcuts(QKeySequence::Quit); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); brushColorAct = new QAction(tr("&Brush Color..."), this); diff --git a/examples/tools/settingseditor/mainwindow.cpp b/examples/tools/settingseditor/mainwindow.cpp index 0f48a5c..0321b55 100644 --- a/examples/tools/settingseditor/mainwindow.cpp +++ b/examples/tools/settingseditor/mainwindow.cpp @@ -122,7 +122,7 @@ void MainWindow::about() void MainWindow::createActions() { openSettingsAct = new QAction(tr("&Open Application Settings..."), this); - openSettingsAct->setShortcut(tr("Ctrl+O")); + openSettingsAct->setShortcuts(QKeySequence::Open); connect(openSettingsAct, SIGNAL(triggered()), this, SLOT(openSettings())); openIniFileAct = new QAction(tr("Open I&NI File..."), this); @@ -146,7 +146,7 @@ void MainWindow::createActions() connect(refreshAct, SIGNAL(triggered()), settingsTree, SLOT(refresh())); exitAct = new QAction(tr("E&xit"), this); - exitAct->setShortcut(tr("Ctrl+Q")); + exitAct->setShortcuts(QKeySequence::Quit); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); autoRefreshAct = new QAction(tr("&Auto-Refresh"), this); diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp index f912ff2..bf0aa41 100644 --- a/examples/tools/undoframework/mainwindow.cpp +++ b/examples/tools/undoframework/mainwindow.cpp @@ -101,16 +101,14 @@ void MainWindow::createActions() //! [5] undoAction = undoStack->createUndoAction(this, tr("&Undo")); - undoAction->setShortcut(tr("Ctrl+Z")); + undoAction->setShortcuts(QKeySequence::Undo); redoAction = undoStack->createRedoAction(this, tr("&Redo")); - QList<QKeySequence> redoShortcuts; - redoShortcuts << tr("Ctrl+Y") << tr("Shift+Ctrl+Z"); - redoAction->setShortcuts(redoShortcuts); + redoAction->setShortcuts(QKeySequence::Redo); //! [5] exitAction = new QAction(tr("E&xit"), this); - exitAction->setShortcut(tr("Ctrl+Q")); + exitAction->setShortcuts(QKeySequence::Quit); connect(exitAction, SIGNAL(triggered()), this, SLOT(close())); aboutAction = new QAction(tr("&About"), this); |