Hello, i created a menu entry in this way:
twmmenuBar
= new QMenuBar(twmMainWindow
);
menuTools
= new QMenu(twmmenuBar
);
menuTools
->setObjectName
(QString::fromUtf8("menuTools"));
twmmenuBar->addAction(menuTools->menuAction());
QMenuBar *twmmenuBar;
twmmenuBar = new QMenuBar(twmMainWindow);
QMenu *menuTools;
menuTools = new QMenu(twmmenuBar);
menuTools->setObjectName(QString::fromUtf8("menuTools"));
twmmenuBar->addAction(menuTools->menuAction());
menuTools->setTitle(QApplication::translate("twmMainWindow", "Tools", 0, QApplication::UnicodeUTF8));
To copy to clipboard, switch view to plain text mode
why this connections doesn't work?
connect ( ui.
menuTools ,
SIGNAL ( triggered
( QAction *) ) ,
this ,
SLOT ( mySlot
QAction * ) ) );
connect ( ui.menuTools , SIGNAL ( triggered( QAction *) ) , this , SLOT ( mySlot QAction * ) ) );
To copy to clipboard, switch view to plain text mode
I get this error:
error: ‘SIGNAL’ was not declared in this scope
error: ‘SIGNAL’ was not declared in this scope
To copy to clipboard, switch view to plain text mode
i checked here
http://doc.trolltech.com/4.2/qmenu.html#triggered
and menuTools is QMenu Object and it should be able to emit the triggered( QAction *) signal.
My needs is throw a slot when menuTools is clicked.
thx
Bookmarks