diff options
Diffstat (limited to 'examples/richtext')
-rw-r--r-- | examples/richtext/orderform/mainwindow.cpp | 6 | ||||
-rw-r--r-- | examples/richtext/syntaxhighlighter/mainwindow.cpp | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/examples/richtext/orderform/mainwindow.cpp b/examples/richtext/orderform/mainwindow.cpp index e5cffe35a9..7e460b73f9 100644 --- a/examples/richtext/orderform/mainwindow.cpp +++ b/examples/richtext/orderform/mainwindow.cpp @@ -49,12 +49,12 @@ MainWindow::MainWindow() { QMenu *fileMenu = new QMenu(tr("&File"), this); QAction *newAction = fileMenu->addAction(tr("&New...")); - newAction->setShortcut(tr("Ctrl+N")); + newAction->setShortcuts(QKeySequence::New); printAction = fileMenu->addAction(tr("&Print..."), this, SLOT(printFile())); - printAction->setShortcut(tr("Ctrl+P")); + printAction->setShortcuts(QKeySequence::Print); printAction->setEnabled(false); QAction *quitAction = fileMenu->addAction(tr("E&xit")); - quitAction->setShortcut(tr("Ctrl+Q")); + quitAction->setShortcuts(QKeySequence::Quit); menuBar()->addMenu(fileMenu); letters = new QTabWidget; diff --git a/examples/richtext/syntaxhighlighter/mainwindow.cpp b/examples/richtext/syntaxhighlighter/mainwindow.cpp index a6312f9a14..0d1b41f914 100644 --- a/examples/richtext/syntaxhighlighter/mainwindow.cpp +++ b/examples/richtext/syntaxhighlighter/mainwindow.cpp @@ -110,14 +110,13 @@ void MainWindow::setupFileMenu() menuBar()->addMenu(fileMenu); fileMenu->addAction(tr("&New"), this, SLOT(newFile()), - QKeySequence(tr("Ctrl+N", - "File|New"))); + QKeySequence::New); + fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()), - QKeySequence(tr("Ctrl+O", - "File|Open"))); + QKeySequence::Open); + fileMenu->addAction(tr("E&xit"), qApp, SLOT(quit()), - QKeySequence(tr("Ctrl+Q", - "File|Exit"))); + QKeySequence::Quit); } void MainWindow::setupHelpMenu() |