# Change module event

**URL:** <https://discourse.slicer.org/t/change-module-event/33790>\
**Category:** Support\
**Created:** [January 16, 2024, 5:18am UTC](https://discourse.slicer.org/t/change-module-event/33790 "2024-01-16T05:18:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![park](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/park/32/5717_2.png) [@park](https://discourse.slicer.org/u/park)\
**Post date:** [January 16, 2024, 5:18am UTC](https://discourse.slicer.org/t/change-module-event/33790/1 "2024-01-16T05:18:55Z")

</div>

Hi all

I would like to make some function which operates when the module is changed.  
(I don’t want to use .slicerrc.py)

Could you give me some tips to implement this ?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [January 16, 2024, 9:02pm UTC](https://discourse.slicer.org/t/change-module-event/33790/2 "2024-01-16T21:02:54Z")

</div>

Each module has an `enter` method where it can do things. Or you can use `slicer.util.moduleSelector` and connect to the `moduleSelected` signal.

Like this:

```auto
slicer.util.moduleSelector().connect('moduleSelected(QString)', print)

```
