Sign in to follow this  

Qt Widgets resizing incorrectly

This topic is 1282 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm breaking my head over this silly problem here. I'm dynamically creating QwtPlot widgets and adding them to a QGridLayout.

 

If the plots don't have any curves attached to them, the height of each plot resizes evenly when I stretch the window (left screen shot).

 

If I add curves to the plots, then they don't resize evenly anymore (see right screen shot). As can be seen, the one at the top decides to consume the most space, and the one at the bottom decides to consume the least space. Why is this happening and how can I make them resize evenly again?

 

[attachment=22110:1.jpg]

Edited by TheComet

Share this post


Link to post
Share on other sites
I can't be certain since I don't know the widgets in question but I would assume they set different preferredHeights depending on what data they contain. It should be probably be enough to set the same non-zero stretch factor for each row.

Share this post


Link to post
Share on other sites

This topic is 1282 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this