QMainWindow Close [SOLVED]
-
Hello,
I am sure the answer to this is somewhere but I cannot seem to locate it. I am currently playing around with Qt and trying to connect a menu bar action "close" to the slot "close()." However, when I do this, I get no error messages. My GUI displays, but selecting Close in the menu does nothing. I am doing the connecting in the constructor of the QMainWindow. I can create a button and connect it to the close() slot and that works. And, I can, of course, use the red X to close my GUI as well. Is there something unique about the menu bar that might cause this? I can definitely post my code, but I simply copied the connect from the QAction to my QPushButton, changed the name and changed triggered() to clicked(). So, I assume the problem lies in how triggered events are handled vs clicked events. Thanks for any advice. I apologize if this exact question has been asked before. I did a quick search but nothing popped out as addressing this particular issue.
-
please post your not working code.
there is no difference in how signals are triggered. Wheny they are emitted, they will reach the target (if connected).
The X in the title bar goes another way, via the system events, but there should be no difference between the button and the action (if the action is really triggered)...
-