Hi all
I have created a Qt application using MSVS 2010 with the Qt Add-In. I created the UI in designer and added two new slots for the QMainWindow (called generat0rXClass in my case). I have created two actions (exit_slot(), addScene2D_slot() ) which trigger the slots. Designer has generated the following code:
QObject::connect(actionExit,
SIGNAL(activated
()), generat0rXClass,
SLOT(exit_slot
()));
QObject::connect(actionNew_2D_Scene,
SIGNAL(activated
()), generat0rXClass,
SLOT(addScene2D_slot
()));
QObject::connect(actionExit, SIGNAL(activated()), generat0rXClass, SLOT(exit_slot()));
QObject::connect(actionNew_2D_Scene, SIGNAL(activated()), generat0rXClass, SLOT(addScene2D_slot()));
To copy to clipboard, switch view to plain text mode
In my main class (generated by the add-In as well, called "generat0rX"
like so:
void exit_slot()
{
msgBox.setText("SLOT: exit_slot triggered");
msgBox.exec();
}
void exit_slot()
{
QMessageBox msgBox;
msgBox.setText("SLOT: exit_slot triggered");
msgBox.exec();
}
To copy to clipboard, switch view to plain text mode
But nothing happens (the click on the corresponding ui element does not trigger the slot). Why is that?
Cheers,
Michael
Bookmarks