Is it possible to replace "this,SLOT" with "a command"?
-
i have this, which works great.
@settingsMenu_->addAction(tr("Quit"), this, SLOT(on_actionQuit_triggered()), QKeySequence(tr("Ctrl+Q")));void MainWindow::on_actionQuit_triggered()
{
qApp->exit(0);
}@but it seems to me such a waste of lines that i call one function to run one command. So i am wondering if something like this could happen:
@settingsMenu_->addAction(tr("Quit"), qApp->exit(0), QKeySequence(tr("Ctrl+Q")));@P.S newbie question i know, but need to ask, curiosity...