Custom icon in tree view

Introduction
This is an example of modifying the icon of a custom viewprovider, which are normally added to scripted objects.

Personalized icon in the combo view
Here an example to create an object with properties and icon personalised in ComboView

Download the example icon to the same directory as the macro

Use of an icon for three different use cases: icon_in_file_disk (format .png), icon_XPM_in_macro (format .XPM) and icon_resource_FreeCAD



Complete example creating a cube and its icon