PDA

View Full Version : Qt Designer - how to make QTextEdit smaller than its sizeHint?



novakk
4th December 2011, 16:40
Hello,

What I want to do with Qt Designer is a simple form with buttons on the right side of the form, and a QTextEdit on the left side. The problem: How can I establish, that the initial Dialog looks like this:
7146
The height of the QTextEdit is same like the height of the 3 buttons, and if the user resize the window, the 3 buttons remain in the right top corner, and the QTextEdit is growing downward.
Thanks:
novakk

Oleg
4th December 2011, 19:36
Just use . Buttons should be in vertical layout with vertical spacer bottom-side. QTextEdit and layout with buttons place inside horizontal layout.

novakk
4th December 2011, 20:30
Thank you for your quick answer Oleg!
I have tried that configuration.
I modified the vertical sizeHint of spacer to zero, but the form will increase till the QTextEdit reaches its vertical sizeHint: 192.
I've tired to change size policies but I cannot solve this problem.
My result is:
7147

Should I include the ui file to make my problem more clear?

NovakK

Oleg
4th December 2011, 20:44
Reset all policies and hints to enable proper auto size handling.