# Understanding UI Editing and Python File Generation in 3DSlicer with Qt Designer

**URL:** <https://discourse.slicer.org/t/understanding-ui-editing-and-python-file-generation-in-3dslicer-with-qt-designer/40369>\
**Category:** Development\
**Created:** [November 25, 2024, 4:45pm UTC](https://discourse.slicer.org/t/understanding-ui-editing-and-python-file-generation-in-3dslicer-with-qt-designer/40369 "2024-11-25T16:45:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [November 26, 2024, 5:15am UTC](https://discourse.slicer.org/t/understanding-ui-editing-and-python-file-generation-in-3dslicer-with-qt-designer/40369/3 "2024-11-26T05:15:01Z")

</div>

Thank you very much for your response, but perhaps I should explain the reason for asking this question so that, if possible, you may guide me further.

Perhaps you have already read the question I raised in my previous message with the title of [Implementing Widgets for Selecting Nodes of Type Segment and Beam](https://discourse.slicer.org/t/implementing-widgets-for-selecting-nodes-of-type-segment-and-beam/40359). In general, I want to familiarize myself with the process of developing modules in 3DSlicer. Therefore, I want to learn how I can develop the functionality of widgets so that I can select specific nodes from the Data module and process them. For example, with one widget, I should be able to select only nodes of type **Segment** , with another widget, only nodes of type **Model** , and with yet another widget, only nodes of type **Beam**.

Based on this, the roadmap I set for myself was to first create a UI that contains a widget of type **qMRMLSegmentSelectorWidget** to select only nodes of type **Segment**. The reason I chose this node is that I found out this widget is part of the **Slicer [MRML Widgets]** in Widget Box of Qt Designer, and it seems to have been specifically added to Qt Designer by the 3D Slicer development team for module implementation. (At this point, I also had a problem, as I couldn’t find other widgets in the list that, based on their names, I could guess might be useful for selecting nodes of specific types.)

By selecting this particular widget, I expected that the related Python file would be much shorter so I could analyze and understand its components, and ultimately develop its function so that it would select only nodes of type **Segment** from the Data module. As I mentioned in my message, the Python file that was generated was default and contains 403 lines.

Best regards.  
Shahrokh

---

_[View the full topic](https://discourse.slicer.org/t/understanding-ui-editing-and-python-file-generation-in-3dslicer-with-qt-designer/40369)._
