I've run into an odd problem when trying to disable a QAction menu item object. There's no good way to paste a small working example, but the code of note is as follows:

Qt Code:
  1. ui.button_send->setEnabled(true);
  2. std::cout << ui.actionConnect->isEnabled() << std::endl;
  3. ui.actionConnect->setEnabled(false);
  4. std::cout << ui.actionConnect->isEnabled() << std::endl;
To copy to clipboard, switch view to plain text mode 

I am trying to have a button that I can click to connect to a simulator (details not important). When the simulator boots up, it sends a signal back that calls the function with this code. The print lines read "1" then "0" as expected, indicating that the actionConnect menu item is no longer enabled. However, I can still click on the meny item after this occurs, and it triggers another redundant attempt to connect (i.e., it is not disabled at all). The button_send button in ui, however, does get enabled properly (after being disabled on startup).

I found a few places through online searching that indicate there may be bugs with QAction::setEnabled(), but nothing concrete. Is there anywhere else I should look to figure out what might be the problem? I know this is vague, so I'm mostly just looking for ideas or hints. Thanks in advance.