Qt World Summit: Register Today!

Using Qt designer, layouts doesn't act as when i did using code

  • hi, when i wanted to do that in code i for example lets say a made Horizontal and vertical layout added stretch and 4 buttons and another stretch to vertical layout , then only add spacing and a list widget and my vertical layout to my Horizontal.

    when i resized window it made buttons resize too (i gave buttons resizePolicy of expanding !)

    but i drag 4 buttons in designer and select them and click vertical layout, it has option to resize, i can't set it to be window size !(buttons expand when i resize window, or to make layout size window size depended) also i can't add stretch factor, there was like 0,0,0,0 stretch factor, i changed it to 1,0,0,1 it didn't make any change !)

    so question is can you tell me how to do that in designer, i already searched google and my chrome is filled with like 10 tabs and i couldn't find my answer on any of them

    this is what i used to do, i already declared the VboxLayout and HBoxLayout
    @ vbox->setSpacing(3);



    i couldn't figure it out and im super tired , :( i just give up !

  • i found out myself, i should have just clicked my apps background instead of selecting the 2 buttons

Log in to reply