tags:

views:

74

answers:

1

i got an action in my menu;

connect(action, SIGNAL(triggered()), this, SLOT(action1()));

but when i executed the function my program always exited. how to solve this?

A: 

Could be a multitude of things, but for starters:

  • Is the "triggered" signal also connected to another slot? e.g. the "quit" slot of the application?
  • Does "action1" close the window? I seem to remember that Qt by default quits the application when the last window is closed.
Morten Fjeldstad