LayoutRect rect; rect.setHeight(100);
LayoutRect rect; int width = 200; int padding = 20; int border = 2; int margin = 10; int contentHeight = 120; rect.setHeight(width + 2 * (padding + border + margin) + contentHeight);This example uses other dimensions of the box, such as its width, padding, border, margin, and content height, to calculate the overall height of the LayoutRect. Package library: WebKit. This code example is specific to the WebKit web engine and is not a part of the standard C++ library.