Skip to content

Commit

Permalink
fmk - putting the event stacked widget inside a QScrollArea
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed May 27, 2024
1 parent efdbff3 commit d940324
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions EVENTS/HydroEventSelection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include <QFileDialog>
#include <QPushButton>
#include <SectionTitle.h>
#include <QScrollArea>

#include <ExistingSimCenterEvents.h>
#include "Utils/ProgramOutputDialog.h"
Expand Down Expand Up @@ -114,6 +115,8 @@ HydroEventSelection::HydroEventSelection(RandomVariablesContainer *theRandomVari
theSelectionLayout->addItem(spacer);
theSelectionLayout->addWidget(eventSelection, 2);
theSelectionLayout->addStretch(3);


layout->addLayout(theSelectionLayout);


Expand All @@ -139,9 +142,22 @@ HydroEventSelection::HydroEventSelection(RandomVariablesContainer *theRandomVari
// ---


// Setup the Layout
layout->addWidget(theStackedWidget);
// Setup the Layout
// layout->addWidget(theStackedWidget);

//
// put inside a scroll area
//

QScrollArea *sa = new QScrollArea;
sa->setWidgetResizable(true);
sa->setLineWidth(0);
sa->setFrameShape(QFrame::NoFrame);
sa->setWidget(theStackedWidget);
layout->addWidget(sa);

this->setLayout(layout);

// --
// Set the default event to select at boot-up. For now, it is MPM
theStackedWidget->setCurrentIndex(3);
Expand Down

0 comments on commit d940324

Please sign in to comment.