Hi guys,

I have this situation:

I have a QMainWindow that contains a QToolBar and a QMenuBar.

I need to disable them, do some computation and enable them again after that.

The problem is that the code:

Qt Code:
  1. menuBar()->setDisable(true);
  2. myToolBar_->setDisable(true);
  3.  
  4. // do a lot of computation
  5.  
  6. menuBar()->setDisable(false);
  7. myToolBar_->setDisable(false);
To copy to clipboard, switch view to plain text mode 

doesn't work. I guess the QMainWindow has a loop and the operations to refresh everything are called only at the end of this loop.
It should work if the mainwindow internal loop is accessed two times or if I call a function to force the update.

I have tried to call both update(), refresh() and show() (both of the mainWindow and of the other widgets) but I didn't succeed.

Do you know anything I can do about that?

I have also tried to use signals and slots but even in this way it didn't work...


Cheers