QAction *action = new QAction("Save", this); action->setStatusTip("Save the document");
QListThis code sets the status tip of each action in a menu bar to be equal to its text. The actions are obtained using the QListactions = ui->menuBar->actions(); foreach (QAction *action, actions) { action->setStatusTip(action->text()); }