# How to set initial size of the main window?

**URL:** <https://discourse.slicer.org/t/how-to-set-initial-size-of-the-main-window/16991>\
**Category:** Development\
**Created:** [April 7, 2021, 9:03pm UTC](https://discourse.slicer.org/t/how-to-set-initial-size-of-the-main-window/16991 "2021-04-07T21:03:08Z")\
**Posts on this page:** 1\
**Page:** 2

<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:** [July 18, 2021, 3:02am UTC](https://discourse.slicer.org/t/how-to-set-initial-size-of-the-main-window/16991/21 "2021-07-18T03:02:58Z")

</div>

You can add `slicer.util.mainWindow().showMaximized()` to the startup script to maximize the window. You can use any other Qt functions to position the main window anywhere.

[Previous page](https://discourse.slicer.org/t/how-to-set-initial-size-of-the-main-window/16991.md?page=1)
