Trouble with creating a custom module

I am currently trying to create my own module with ExtensionWizard. I used QTDesigner to create the UI, which is now mostly done. What I’m trying to do now is to get the module to save data to specific folders based on user input. In this case, I want the module to be able to create new folders and then save markup data, tables, and texts within these new folders.

Here is an example of the kind of data hierarchy I’m aiming to create.

Here’s what my module looks like.

You can create folders using standard Python functions and then export nodes into them using slicer.util.saveNode or slicer.util.exportNode functions.

I used QT Designer to design the UI, and didn’t use any Python. I’m not sure how to make it so that pressing a certain button (“Save”) in the UI will create a folder and export the nodes.

Your can connect a button event (e.g., click) to a Python method as it is shown in the scripted module template.