I make a program for this tutorial. Added an OpenGL Widget element to the form and I want to make it stretch when the main window resizes. Made all the settings as in the video (and also tried other settings options):

  • Horizontal Policy: Expanding
  • Vertical policy: Preferred

But when the window is resized, the dimensions of the element remain fixed:

enter image description here

I do not understand what's wrong

    1 answer 1

    It is necessary for the root centralWindget layout. This is if you have everything else arranged, otherwise you need to restore order everywhere with the layout.