koraytaylan
koraytaylan

Reputation: 893

qt equivalent for docking control to it's container in winforms

I'm trying out qt creator lately and i hate reading hours of docs and tutorials just for doing simple tasks.

So, in winforms i can drag & drop a control from toolbox and set the dock property so it automatically maximizes itself to it's container's size.

What is the equivalent of this behaviour in qt?

I googled this and found it strange that nobody wondered the same before.

Upvotes: 1

Views: 703

Answers (2)

Bill
Bill

Reputation: 11822

There are differences between the concepts of WinForms and Qt. You need to study the concept of layouts. Take a look at the relevant part of the documentation of Qt Designer: Using Layouts in Qt Designer

Before a form can be used, the objects on the form need to be placed into layouts. This ensures that the objects will be displayed properly when the form is previewed or used in an application. Placing objects in a layout also ensures that they will be resized correctly when the form is resized.

Upvotes: 1

user362638
user362638

Reputation:

Qt uses layouts. Add QHBoxLayout or QVBoxLayout to the parent widget.

Upvotes: 0

Related Questions