Link to home
Start Free TrialLog in
Avatar of geoffryf
geoffryfFlag for Canada

asked on

Qt Creator: How to make Label widget scale with the window?

I'm a .NET developer and try to play with Qt and have encountered a problem.

In Visual Studio, I can make a Label control dock = Fill, so it will fill the form with the label. As the size of the window change, it will change the size of the label.

How do i do that in Qt? (I'm using Qt Creator)

Thanks
Avatar of irfan_omair
irfan_omair
Flag of United States of America image

I suggest learning about layout.
My best guess for this solution is to put your label in Layout that will solve your problem
Avatar of geoffryf

ASKER

Thanks for your response

Can you please give me a more clear direction as to how to approach this problem? I'm really lost as I used to Visual Studio way of docking controls

Thanks
ASKER CERTIFIED SOLUTION
Avatar of irfan_omair
irfan_omair
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is perfect. I need both Qt Creator method and code method.

Your sample code helped me to resolve my concerns.

Thanks :)
I am glad I was able to help. I wonder why this question was asked in c++ zone, Qt zone is there under IDE