#Stretched align on frame inside

1 messages · Page 1 of 1 (latest)

shy phoenix
#

convert frame0 to a overlay and then back to a frame and you will have the intended slot type for this scenario

#

I would however suggest to stick with a overlayWidget unless if you really need the frameWidget

#

your issue in your case seems to be some wizardery with the transform category being wrong for the image itself. It shouldnt happen, but somehow it did

atomic flower
#

Hey, thanks for the reply! My original intent was to create a widget that has fixed required width but full height of the parent widget

#

Converting back and forth resets the anchor settings for the image inside the frame, but once I setup the anchor the way I want I face the same issue again

#

Size X = 400, No offsets on top and bottom inside GridLayoutWidget

#

Exactly the same slot/anchor setup inside UniformGridLayoutWidget

#

Needed width, full height (no offsets from either top or bottom)

shy phoenix
#
  • the GridLayout wasnt configured to have at least one row and one collum
  • the FrameWidget wasnt set to extend on the whole screenspace but instead to be attached on a corner
#

should work better this way

#

apologies, its still the morning for me. Coffee did not hit yet ☕

atomic flower
#

No worries, big thanks for trying to help!

atomic flower
# shy phoenix

The width is 100% here (Offset Left/Right instead of Position X/Size X)

shy phoenix
atomic flower
#

Yeah, the issue that when I do vertical anchor (0,0,0,1), the height collapses to 0 in GridLayoutWidget despite grid having real height, while height is proper full height in UniformGridLayoutWidget

shy phoenix
#

the image stretch to the entire available space given by the frame
if the frame only say "I am attached to the ceilling" it wont have any real space

And yes Grid and UniformGrid behaves differently, the uniform one is easier to work with for.. well Uniform slots and is usually prefered as it does most of the work for you like not having to specify how many rows you will need

atomic flower
#

Yeah I guess its just a trait of uniform grid compared to normal grid

#

uniform grid stretches cells to fully fit itself while normal grid doesn't unless something specifically sets the height

#

Oooh, there is "Row fill" and "Column fill" in normal grid

shy phoenix
atomic flower
#

It works now!

#

Set width, full height!

shy phoenix
#

in short, grid is more "manual" while uniformgrid is more "automatic"

atomic flower
#

This was the key in normal grid properties

#

Took it from your layout example, thanks for the help!

#

No idea what these values are though, if row fill is 0, cell height collapses to 0 as in my original problem, if its >0 (any value), cell height is 100% of the grid widget

#

Either way, it works

shy phoenix
#

when its only one, it doesnt do much as long as it is more than 0

atomic flower
#

Oh, the values relative to each other, not to the grid itself