Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using Qt designer, layouts doesn't act as when i did using code

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 937 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kamhagh
    wrote on last edited by
    #1

    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);

    vbox->addStretch(1);
    vbox->addWidget(add);
    vbox->addWidget(rename);
    vbox->addWidget(remove);
    vbox->addWidget(removeAll);
    vbox->addStretch(1);

    hbox->addWidget(lw);
    hbox->addSpacing(5);
    hbox->addLayout(vbox);@

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

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kamhagh
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved