public function __construct() { parent::__construct(); $this->screenshotLabel = new QLabel(); $this->screenshotLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); $this->screenshotLabel->setAlignment(Qt::AlignCenter); $this->screenshotLabel->setMinimumSize(240, 160); $this->createOptionsGroupBox(); $this->createButtonsLayout(); $this->mainLayout = new QVBoxLayout(); $this->mainLayout->addWidget($this->screenshotLabel); $this->mainLayout->addWidget($this->optionsGroupBox); $this->mainLayout->addLayout($this->buttonsLayout); $this->setLayout($this->mainLayout); $this->shootScreen(); $this->delaySpinBox->setValue(5); $this->setWindowTitle(tr("Screenshot")); $this->resize(300, 200); }