QMenu* pmuFile = new QMenu("&File"); QMenu* pmuHelp = new QMenu("&Help"); notepad* pnotepad = new notepad; pmuFile->addAction("&Open", pnotepad, SLOT(SLoad()), QKeySequence("CTRL+O") ); pmuFile->addAction("&Save", pnotepad, SLOT(SSave()), QKeySequence("CTRL+S") ); pmuFile->addAction("&Save As", pnotepad, SLOT(SLoad()), QKeySequence("CTRL+SHIFT+S") ); pmuFile->addSeparator(); pmuFile->addAction("&Quit", qApp, SLOT(Quit()), QKeySequence("CTRL+Q") ); pmuFile->addAction("&About", this, SLOT(SAbout()), Qt::Key_F1 );
C++ (Qt)stream.setCodec("UTF-8");