(Qt): little bug in previous commit

git-svn-id: trunk@11705 -
This commit is contained in:
paul 2007-08-01 11:56:56 +00:00
parent 70ee268b83
commit 19c4c706cc

View File

@ -335,14 +335,25 @@ begin
end;
class procedure TQtWSWinControl.ConstraintsChange(const AWinControl: TWinControl);
const
QtMaxContraint = $FFFFFF;
var
Widget: TQtWidget;
MaxW, MaxH: Integer;
begin
Widget := TQtWidget(AWinControl.Handle);
with AWinControl do
begin
Widget.setMinimumSize(Constraints.MinWidth, Constraints.MinHeight);
Widget.setMaximumSize(Constraints.MaxWidth, Constraints.MaxHeight);
if Constraints.MaxWidth = 0 then
MaxW := QtMaxContraint
else
MaxW := Constraints.MaxWidth;
if Constraints.MaxHeight = 0 then
MaxH := QtMaxContraint
else
MaxH := Constraints.MaxHeight;
Widget.setMaximumSize(MaxW, MaxH);
end;
end;