I like the checkboxes that are used for showing and hiding.For example the one in the Volume Rendering module or to show/hide segments in the segment editor.
I know how to add an ordinary checkbox widget in my module using Python.
But how to make it into this eye-icon like checkbox?
Sorry, how do I actually set the icon? It looks like I need to select it from a file or resource, but I’m not sure what’s the easiest way to access that.
You start Qt Designer as described in the documentation. Then you click on the little arrow next to the icon (see screenshot above), then select Choose Resource.... You can then import the resource file path\to\Slicer\Libs\MRML\Widgets\Resources\qMRMLWidgets.qrc. You’ll then see the icons in the resource list.
I am trying to add the resource file, but I am unable to navigate to it or add that path. I am also unable to find the file on my Mac within the Slicer application.