# Remake Save function

**URL:** <https://discourse.slicer.org/t/remake-save-function/29786>\
**Category:** Development\
**Tags:** python\
**Created:** [June 2, 2023, 2:08am UTC](https://discourse.slicer.org/t/remake-save-function/29786 "2023-06-02T02:08:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsa934](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dsa934/32/17907_2.png) [@dsa934](https://discourse.slicer.org/u/dsa934)\
**Post date:** [June 2, 2023, 2:08am UTC](https://discourse.slicer.org/t/remake-save-function/29786/1 "2023-06-02T02:08:39Z")

</div>

Operating system: 10  
Slicer version: 5.2.1

Hi, slicer users,

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/e/eebe92c1fe4ecc521c5972c8e55d2029ebd4829c.png)

I want to recreate the currently implemented save function with python.  
Is it correct that the current implementation of the save function is made in C++ and qt?

I’m trying to override this with a function that requires some additional conditions to be met when the save button is pressed in order to save. Is it possible to access the save widget with Python?

My first attempt was to overriding the hotkey (“Ctrl+s”), but I can’t seem to override the existing hotkey.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 2, 2023, 11:29pm UTC](https://discourse.slicer.org/t/remake-save-function/29786/2 "2023-06-02T23:29:54Z")

</div>

Yes, sure, you can override the custom save dialog, donwhat vér you need to do, and then if you want you can also call the default dialog. I think the details were asked and described on this forum but if you cannot find it then let us know.
