Writing the definition of the widget and set the max height and width to never be bigger than the window.
Writing the definition of the widget and set the max height and width to never be bigger than the window.