Consider this code:
Qt Code:
  1. bar.actions().append(new QAction("Hello World"));
To copy to clipboard, switch view to plain text mode 

QMenuBar returns a QList of QAction pointer, after I appended a new action, how does QMenuBar be notified on the change, so that it can update the UI accordingly?

I also tried to create a class that inherits from QList and I found no way to be notified when the list is changed.

Thanks in advance.