Solved Resize objects with mainwindow is maximized
-
Re: Resize Objects With Mainwindow Resize
Hi, i'm using Qt Creator. My main window have a qTextEdit object and when this is resized the object change her size only some bit. I want at my object resize along with the main window. I'm using horizontal layout, but this isn't working. How can fix this?
My Code:
Source file: https://paste.centos.org/view/ce954c9e
Header file: https://paste.centos.org/view/201d34d5
Ui file: https://paste.centos.org/view/94191786 -
Hi and welcome to devnet,
Please show your code. You don't give enough information to even guess what might be happening.
-
Okay, i edited this.
-
Why did you set the size policy to minimum for both horizontal and vertical ?
-
@SGaist because only with this option the interface is “okay". Before, that was in preferred, but searching on the internet I saw a recommendation to use minimal.
-
Can you provide a complete minimal example code ? That way we may try to reproduce your issue with the exact same initial conditions as you.
-
I fixed it by editing the .ui file, the problem is that I had adjusted the sizePolicy of the QTextEdit in QAbstractScrollArea :: AdjustToContentsOnFirstShow. Thanks for everything.