Skip to content

Commit

Permalink
resizable info field in datasetloadwidget
Browse files Browse the repository at this point in the history
  • Loading branch information
Optiligence committed Feb 24, 2015
1 parent 0412f10 commit 9261296
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions widgets/datasetloadwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,10 @@ DatasetLoadWidget::DatasetLoadWidget(QWidget *parent) : QDialog(parent) {
auto hLayoutLine0 = new QHBoxLayout;
hLayoutLine0->addWidget(line0);

auto hLayoutDatasetInfo = new QGridLayout;
auto hDatasetInfoSplitter = new QSplitter();
tableWidget = new QTableWidget();
tableWidget->setColumnCount(3);

tableWidget->resizeRowsToContents();
tableWidget->setSelectionMode(QAbstractItemView::SingleSelection);

tableWidget->verticalHeader()->setVisible(false);
tableWidget->horizontalHeader()->setVisible(false);

Expand All @@ -60,17 +57,17 @@ DatasetLoadWidget::DatasetLoadWidget(QWidget *parent) : QDialog(parent) {
tableWidget->horizontalHeader()->resizeSection(2, 40);
tableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);

hLayoutDatasetInfo->addWidget(tableWidget, 0, 0);

infolabel = new QLabel();
auto str = QString("");
infolabel->setText(str);

scrollarea = new QScrollArea();
scrollarea->setWidgetResizable(true);
scrollarea->setWidget(infolabel);

hLayoutDatasetInfo->addWidget(scrollarea, 0, 1);
hDatasetInfoSplitter->addWidget(tableWidget);
hDatasetInfoSplitter->addWidget(scrollarea);
const auto splitterWidth = hDatasetInfoSplitter->size().width();
hDatasetInfoSplitter->setSizes({splitterWidth/2, splitterWidth/2});

QFrame* line1 = new QFrame();
line1->setFrameShape(QFrame::HLine);
Expand All @@ -95,7 +92,7 @@ DatasetLoadWidget::DatasetLoadWidget(QWidget *parent) : QDialog(parent) {
auto localLayout = new QVBoxLayout();

localLayout->addLayout(hLayoutLine0);
localLayout->addLayout(hLayoutDatasetInfo);
localLayout->addWidget(hDatasetInfoSplitter);
localLayout->addLayout(hLayoutLine1);
localLayout->addLayout(hLayout2);
localLayout->addWidget(&segmentationOverlayCheckbox);
Expand Down

0 comments on commit 9261296

Please sign in to comment.