Translations:Development/Tutorials/Using Actions/28/en

From KDE TechBase
Revision as of 07:31, 26 October 2019 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If the action is going to be displayed in a toolbar, it is nice to have an icon depicting the action. The icon may also be displayed beside the action in the menus, depending on the widget style. The following code sets the icon to the standard the document-new icon through the use of the setIcon() function: