tags:

views:

58

answers:

1

Does Qt have a built-in way to inflate or grow a rectangle? Like .NET's Rectangle.Inflate or Java's Rectangle.grow... or do I have to implement my own? I've looked through the docs and couldn't find one but maybe I'm missing something.

+6  A: 

There seems to be an adjust function that comes closest to what you want. You could easily use it to "inflate" a rectangle:

rect.adjust(-dx, -dy, dx, dy);

where dx and dy are the amounts you want to inflate in the x and y directions.

casablanca
This seems about the best. Thanks.
Jake Petroules