For this project i'm using Windows and Qt 4.1.2
I have a QMainWindow that contains a widget that occupies the entire window. When the resizeEvent of the child widget is called I want the child to maintain proportions. After fixing the width/height proportions of the child I need to resize the parent.
I've included a complete program that demonstrates the issue.
Here is the wrong solution, but what would be a good workaround for it?
Qt Code:
{ _figureHeight = newsz.width()*_figureHeight/_figureWidth; _figureWidth = newsz.width(); parentWidget()->resize(_figureWidth, _figureHeight); }To copy to clipboard, switch view to plain text mode
Bookmarks