开发者

Qt Application quits after slot of QAction gets triggered

I've created an action for my QMenu and connected it to a slo开发者_运维百科t "action1" like this

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

but when i execute this code, my application quits.

How to solve this?


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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜