Deep
Deep

Reputation: 2512

Qt creator 2 vertical splitters and fixed middle height

I try create middle space with fixed height and disable hide behaviour for it. This screenshot of my test window:

This screenshot of my test window

As you can see, middle space too flat and can be hide when you drag it up or down to max position.

How to correct make this layouts behaviour?

EDIT:

enter image description here

Now I set min max height of this middle widget. This fix height. But how to disable hide behaviour?

EDIT 2:

I found it. splitter->setChildrenCollapsible(false)

This disable it for all. But I want disable it for middle widget only.

Upvotes: 0

Views: 268

Answers (1)

Adrien Leravat
Adrien Leravat

Reputation: 2789

Like you saw, splitter have the setChildrenCollapsible, but also a second one which is setCollapsible (see QSpliter doc), letting you set this for a specific childre index.

In your case, the following code would be appropriate for the 2nd widget:

mySplitter->setCollapsible(1, false);

Upvotes: 1

Related Questions