QAction *action = new QAction("Open", this); action->setProperty("tooltip", "Open a file");
QAction *action = new QAction("Save", this); QIcon icon(":/icons/save.png"); action->setIcon(icon);This example sets a custom icon on a new QAction object that represents the "Save" action. The icon is loaded from a file called "save.png" using the Qt resource system. Package library: Qt