# How to add user-defined QTUI panel to the slicer

**URL:** https://discourse.slicer.org/t/how-to-add-user-defined-qtui-panel-to-the-slicer/9862
**Category:** Development
**Created:** [January 18, 2020, 8:57am UTC](https://discourse.slicer.org/t/how-to-add-user-defined-qtui-panel-to-the-slicer/9862 "2020-01-18T08:57:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Shicong](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shicong/32/6562_2.png) [@Shicong](https://discourse.slicer.org/u/Shicong)
#### Post date: [January 18, 2020, 8:57am UTC](https://discourse.slicer.org/t/how-to-add-user-defined-qtui-panel-to-the-slicer/9862/1 "2020-01-18T08:57:32Z")

</div>

I’d like to add a displayed qt panel qslicerlogindialog.ui to the slider, which is placed in the directory shown below, but cannot be used; a panel like qslicerdatadialog.ui automatically generates a qslicerdialog\_p.h header file and a qslicerdatadialogprivate class, but how can I add a new qslicerlogindialog.ui to generate a qslicerlogindialog\_p.h header file and aqslicerlogerlogePrivate class? Qslicerdatadialog\_p.h How was this file generated? Thanks.

 ![pzha1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/1/c1449a166d97b2f91846a9ef35fbeb4e3da9f58f.png)

---

<div class="post-metadata">

### Author: ![Shicong](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shicong/32/6562_2.png) [@Shicong](https://discourse.slicer.org/u/Shicong)
#### Post date: [January 18, 2020, 10:25am UTC](https://discourse.slicer.org/t/how-to-add-user-defined-qtui-panel-to-the-slicer/9862/2 "2020-01-18T10:25:01Z")

</div>

This question is how to make your own pop-up box in slicer app。

---

<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: [January 18, 2020, 2:37pm UTC](https://discourse.slicer.org/t/how-to-add-user-defined-qtui-panel-to-the-slicer/9862/3 "2020-01-18T14:37:45Z")

</div>

You can create and edit .ui files using [Qt designer](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/QtDesigner). You can write everything from scratch but I usually start from copying and renaming .cxx, .h, .ui files of an existing similar widget.

---

<div class="post-metadata">

### Author: ![Shicong](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shicong/32/6562_2.png) [@Shicong](https://discourse.slicer.org/u/Shicong)
#### Post date: [January 19, 2020, 1:47am UTC](https://discourse.slicer.org/t/how-to-add-user-defined-qtui-panel-to-the-slicer/9862/4 "2020-01-19T01:47:47Z")

</div>

Thank you very much!
