summaryrefslogtreecommitdiffstats
path: root/examples/mainwindows
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mainwindows')
-rw-r--r--examples/mainwindows/application/mainwindow.cpp2
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.cpp2
-rw-r--r--examples/mainwindows/mdi/mainwindow.cpp2
-rw-r--r--examples/mainwindows/menus/mainwindow.cpp8
-rw-r--r--examples/mainwindows/recentfiles/mainwindow.cpp2
-rw-r--r--examples/mainwindows/sdi/mainwindow.cpp2
6 files changed, 9 insertions, 9 deletions
diff --git a/examples/mainwindows/application/mainwindow.cpp b/examples/mainwindows/application/mainwindow.cpp
index ebbfb5a2c1..a1eb9b6154 100644
--- a/examples/mainwindows/application/mainwindow.cpp
+++ b/examples/mainwindows/application/mainwindow.cpp
@@ -174,7 +174,7 @@ void MainWindow::createActions()
//! [20]
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
//! [20]
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
diff --git a/examples/mainwindows/dockwidgets/mainwindow.cpp b/examples/mainwindows/dockwidgets/mainwindow.cpp
index aad80e1540..77d2fef7d2 100644
--- a/examples/mainwindows/dockwidgets/mainwindow.cpp
+++ b/examples/mainwindows/dockwidgets/mainwindow.cpp
@@ -242,7 +242,7 @@ void MainWindow::createActions()
connect(undoAct, SIGNAL(triggered()), this, SLOT(undo()));
quitAct = new QAction(tr("&Quit"), this);
- quitAct->setShortcut(tr("Ctrl+Q"));
+ quitAct->setShortcuts(QKeySequence::Quit);
quitAct->setStatusTip(tr("Quit the application"));
connect(quitAct, SIGNAL(triggered()), this, SLOT(close()));
diff --git a/examples/mainwindows/mdi/mainwindow.cpp b/examples/mainwindows/mdi/mainwindow.cpp
index 9646fba189..3cb54f1d3e 100644
--- a/examples/mainwindows/mdi/mainwindow.cpp
+++ b/examples/mainwindows/mdi/mainwindow.cpp
@@ -235,7 +235,7 @@ void MainWindow::createActions()
//! [0]
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
//! [0]
diff --git a/examples/mainwindows/menus/mainwindow.cpp b/examples/mainwindows/menus/mainwindow.cpp
index 53b2ad524d..f8e585dd8a 100644
--- a/examples/mainwindows/menus/mainwindow.cpp
+++ b/examples/mainwindows/menus/mainwindow.cpp
@@ -219,7 +219,7 @@ void MainWindow::createActions()
connect(printAct, SIGNAL(triggered()), this, SLOT(print()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
@@ -240,7 +240,7 @@ void MainWindow::createActions()
connect(cutAct, SIGNAL(triggered()), this, SLOT(cut()));
copyAct = new QAction(tr("&Copy"), this);
- copyAct->setShortcut(tr("Ctrl+C"));
+ copyAct->setShortcuts(QKeySequence::Copy);
copyAct->setStatusTip(tr("Copy the current selection's contents to the "
"clipboard"));
connect(copyAct, SIGNAL(triggered()), this, SLOT(copy()));
@@ -253,7 +253,7 @@ void MainWindow::createActions()
boldAct = new QAction(tr("&Bold"), this);
boldAct->setCheckable(true);
- boldAct->setShortcut(tr("Ctrl+B"));
+ boldAct->setShortcut(QKeySequence::Bold);
boldAct->setStatusTip(tr("Make the text bold"));
connect(boldAct, SIGNAL(triggered()), this, SLOT(bold()));
@@ -263,7 +263,7 @@ void MainWindow::createActions()
italicAct = new QAction(tr("&Italic"), this);
italicAct->setCheckable(true);
- italicAct->setShortcut(tr("Ctrl+I"));
+ italicAct->setShortcut(QKeySequence::Italic);
italicAct->setStatusTip(tr("Make the text italic"));
connect(italicAct, SIGNAL(triggered()), this, SLOT(italic()));
diff --git a/examples/mainwindows/recentfiles/mainwindow.cpp b/examples/mainwindows/recentfiles/mainwindow.cpp
index 365edebbbb..1671f5343b 100644
--- a/examples/mainwindows/recentfiles/mainwindow.cpp
+++ b/examples/mainwindows/recentfiles/mainwindow.cpp
@@ -132,7 +132,7 @@ void MainWindow::createActions()
}
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
diff --git a/examples/mainwindows/sdi/mainwindow.cpp b/examples/mainwindows/sdi/mainwindow.cpp
index f7c396446c..8710105a56 100644
--- a/examples/mainwindows/sdi/mainwindow.cpp
+++ b/examples/mainwindows/sdi/mainwindow.cpp
@@ -180,7 +180,7 @@ void MainWindow::createActions()
connect(closeAct, SIGNAL(triggered()), this, SLOT(close()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));