From 0458c123682a15808753b6d113da235af63009e5 Mon Sep 17 00:00:00 2001 From: mar77i Date: Sun, 7 Apr 2024 01:24:11 +0200 Subject: [PATCH] subordinate img_label to a QScrollArea --- bigintwidget.cpp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/bigintwidget.cpp b/bigintwidget.cpp index 5ae07ce..399ee88 100644 --- a/bigintwidget.cpp +++ b/bigintwidget.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "bigintwidget.h" @@ -11,11 +12,13 @@ BigintWidget::BigintWidget(QWidget *parent) : QWidget(parent), fw(new QFutureWatcher(this)), - meta(8192, QSize(1800, 900)), + meta(128, QSize(1800, 900)), img_label(new QLabel(this)), img_dirty(true), status_bar(new QStatusBar(this)) { + QScrollArea *scroll_area = new QScrollArea(this); + scroll_area->setWidget(img_label); connect( fw, &QFutureWatcher::resultReadyAt, @@ -31,7 +34,7 @@ BigintWidget::BigintWidget(QWidget *parent) fw->setFuture(QtConcurrent::mapped(meta.get_cells(), MandelMeta::iterate)); setLayout(new QVBoxLayout()); layout()->addWidget(setup_menu_bar()); - layout()->addWidget(img_label); + layout()->addWidget(scroll_area); status_bar->setSizeGripEnabled(false); layout()->addWidget(status_bar); img_label->setMinimumSize(meta.get_size()); @@ -60,21 +63,6 @@ QMenuBar *BigintWidget::setup_menu_bar() { &BigintWidget::close ); menu_bar->addMenu(menu); -/* - menu = new QMenu("&Calcluation", this); - connect( - menu->addAction("&Double Max Iterations"), - &QAction::triggered, - this, - &meta.double_max_iter - ); - connect( - menu->addAction("&Halve Max Iterations"), - &QAction::triggered, - this, - &meta.halve_max_iter - ); -*/ return menu_bar; } -- 2.47.0