# How to include qwidgets in slicer qml layout

**URL:** <https://discourse.slicer.org/t/how-to-include-qwidgets-in-slicer-qml-layout/13259>\
**Category:** Support\
**Created:** [August 31, 2020, 5:44pm UTC](https://discourse.slicer.org/t/how-to-include-qwidgets-in-slicer-qml-layout/13259 "2020-08-31T17:44:44Z")\
**Posts on this page:** 2\
**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:** [August 31, 2020, 5:44pm UTC](https://discourse.slicer.org/t/how-to-include-qwidgets-in-slicer-qml-layout/13259/1 "2020-08-31T17:44:44Z")

</div>

![Screenshot from 2020-08-31 23-09-42](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/1/e1f529b28bb6704c4a028c83d6fe0527fe63f585.png)

I am using this layout. I want to insert a toolbar on top of first viewNode only.  
That means at grid(0,0) position I want a layout which contains both toolbar and viewNode1.  
How can I do this?

---

<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:** [August 31, 2020, 5:52pm UTC](https://discourse.slicer.org/t/how-to-include-qwidgets-in-slicer-qml-layout/13259/2 "2020-08-31T17:52:28Z")

</div>

You can only add view widgets in the view layout. You can customize what Qt widgets are shown in the view control and add custom widgets, as shown in this example in the script repository: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Customize\_widgets\_in\_view\_controller\_bars](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Customize_widgets_in_view_controller_bars)
