# Adding widget above or below the toolbar

**URL:** <https://discourse.slicer.org/t/adding-widget-above-or-below-the-toolbar/19464>\
**Category:** Support\
**Created:** [September 1, 2021, 2:34pm UTC](https://discourse.slicer.org/t/adding-widget-above-or-below-the-toolbar/19464 "2021-09-01T14:34:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)\
**Post date:** [September 1, 2021, 2:34pm UTC](https://discourse.slicer.org/t/adding-widget-above-or-below-the-toolbar/19464/1 "2021-09-01T14:34:54Z")

</div>

I am running a custom python script with slicer main window. And I want to add a widget or layout between above or below the toolbar.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [September 1, 2021, 3:39pm UTC](https://discourse.slicer.org/t/adding-widget-above-or-below-the-toolbar/19464/2 "2021-09-01T15:39:24Z")

</div>

A [QMainWindow](https://doc.qt.io/qt-5/qmainwindow.html) does not support widgets above the top toolbar area.

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

---

<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:** [September 1, 2021, 4:55pm UTC](https://discourse.slicer.org/t/adding-widget-above-or-below-the-toolbar/19464/3 "2021-09-01T16:55:20Z")

</div>

If you want to place anything above toolbars then they have to be toolbars, too. You can have any number of toolbar rows, put any number of toolbars in them, put any widgets in any of the toolbars, and you can move the toolbars between toolbar rows any way you want. This is all standard Qt API, so look for details in the Qt documentation, Stack Overflow, etc.
