void WDialog::setMaximumSize(const WLength& width, const WLength& height) { WCompositeWidget::setMaximumSize(width, height); WLength w = width.unit() != WLength::Percentage ? width : WLength::Auto; WLength h = height.unit() != WLength::Percentage ? height : WLength::Auto; impl_->resolveWidget("layout")->setMaximumSize(w, h); }
int StdGridLayoutImpl2::pixelSize(const WLength& size) { if (size.unit() == WLength::Percentage) return 0; else return (int)size.toPixels(); }