1

I try to create a form with Qt designer. The prototype is:
Figure 1

I create three horizontal layouts in a vertical layout, and set layout stretch of vertical layout to 0, 1, 0, it makes middle layout looks larger.

After compiling by pyuic4, I got:
Figure 2

Seems like it totally ignored the layout stretch I set, even though it was generated correctly in output python code.

Finally I tried to take off the layout stretch setting from the layout:
Figure 3

And compiling again produce the same output.

Is someone knows what the problem is?

5
  • Tried to improve your question adding the images and editing the references but couldn't understand what you meant with "the output is Figure 3, and just like Figure 2", please re-edit/fix if necessary. Jul 27, 2014 at 19:29
  • I would try adding some content (or spacer) to the right-middle panel, to see if that helps.
    – mdurant
    Jul 27, 2014 at 21:29
  • @KurzedMetal Thanks a lot! My question is that I try to set the layout stretch, but it doesn't work, and the production just like I haven't set anything at all.
    – yomao
    Jul 28, 2014 at 4:58
  • @mdurant You're right!! I love you man!! How about answer it? And I will vote it as right answer.
    – yomao
    Jul 28, 2014 at 5:06
  • By the way, after trying, I found that layout stretch is not work at all. If a piece of panel need to be expand, spacer is a good way to solve it.
    – yomao
    Jul 28, 2014 at 5:11

1 Answer 1

0

Please add some content into the right-middle panel. A spacer should work, if you have nothing else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.