404 const int n = widgets.
size();
405 const int width = widgets.
at(0)->width();
406 const int height = widgets.
at(0)->height();
407 const int ncols =
qMax(domain.
width() / width, 1);
408 const int nrows = n / ncols + ((n % ncols) ? 1 : 0);
411 for (
int row = 0; row < nrows; ++row) {
412 for (
int col = 0; col < ncols; ++col) {
413 const int x = col * width;
414 const int y = domain.
height() - height - row * height;
QPointer< QWidget > widget
int width() const
Returns the width of the rectangle.
int height() const
Returns the height of the rectangle.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
static bool sanityCheck(const QMdiSubWindow *const child, const char *where)
const T & at(int i) const
Returns the item at index position i in the list.
static QRect visualRect(Qt::LayoutDirection direction, const QRect &boundingRect, const QRect &logicalRect)
Returns the given logicalRectangle converted to screen coordinates based on the specified direction...
The QPoint class defines a point in the plane using integer precision.
int size() const
Returns the number of items in the list.
The QRect class defines a rectangle in the plane using integer precision.