openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this);openAct->setShortcut(tr("Ctrl+O"));openAct->setStatusTip(tr("Open an existing file"));connect(openAct, SIGNAL(triggered()), this, SLOT(copy()));
QMainDialog::QMainDialog(QWidget *parent) : QDialog(parent){ setupUi(this); copyAction = new QAction(tr("&Copy"), this); copyAction->setShortcut(tr("Ctrl+C")); connect(copyAction, SIGNAL(triggered()), this, SLOT(copy()));}
//snip connect(copyAction, SIGNAL(triggered()), this, SLOT(copy())); addAction(copyAction);}