mattia
20th December 2007, 08:02
Hello, i created a menu entry in this way:
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));
why this connections doesn't work?
connect ( ui.menuTools , SIGNAL ( triggered( QAction *) ) , this , SLOT ( mySlot QAction * ) ) );
I get this error:
error: ‘SIGNAL’ was not declared in this scope
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
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));
why this connections doesn't work?
connect ( ui.menuTools , SIGNAL ( triggered( QAction *) ) , this , SLOT ( mySlot QAction * ) ) );
I get this error:
error: ‘SIGNAL’ was not declared in this scope
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