saveAction = new QAction(tr("&Save"), this);
exitAction = new QAction(tr("E&xit"), this);
- connect(openAction, SIGNAL(triggered()),
- this, SLOT(open()));
- connect(saveAction, SIGNAL(triggered()),
- this, SLOT(save()));
- connect(exitAction, SIGNAL(triggered()),
- qApp, SLOT(quit()));
+ connect(openAction, &QAction::triggered,
+ this, &Mainwindow::open);
+ connect(saveAction, &QAction::triggered,
+ this, &Mainwindow::save);
+ connect(exitAction, &QAction::triggered,
+ qApp, &QApplication::quit);
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(openAction);