void tst_QBoxLayout::setGeometry() { QWidget w; QVBoxLayout *lay = new QVBoxLayout; lay->setMargin(0); lay->setSpacing(0); QHBoxLayout *lay2 = new QHBoxLayout; QDial *dial = new QDial; lay2->addWidget(dial); lay2->setAlignment(Qt::AlignTop); lay2->setAlignment(Qt::AlignRight); lay->addLayout(lay2); w.setLayout(lay); w.show(); QRect newGeom(0, 0, 70, 70); lay2->setGeometry(newGeom); QVERIFY2(newGeom.contains(dial->geometry()), "dial->geometry() should be smaller and within newGeom"); }