void ViewportWidget::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); Q_ASSERT(this->parentWidget()); this->resize(calcDrawArea(this->parentWidget()->width(), this->parentWidget()->height())); this->setGeometry(this->parentWidget()->width() / 2 - this->width() / 2, this->parentWidget()->height() / 2 - this->height() / 2, this->width(), this->height()); /* This if fb filling background draw is wanted instead of buildPane() _pixelRatio = (qreal)this->width() / (qreal)SCREEN_WIDTH; */ buildPane(); }
ModelDisplay::ModelDisplay(QObject *parent) : Model3D(parent), _displayValue(QImage(200, 100, QImage::Format_ARGB32)) { buildPane(); }