src/RelpipeChartMainWindow.cpp
branchv_0
changeset 32 23018a2ed2a0
parent 29 0f9f7d6564cd
child 42 707a6734f364
equal deleted inserted replaced
31:47fb4bb3db45 32:23018a2ed2a0
    44 	QTableView* tableView = new QTableView(this);
    44 	QTableView* tableView = new QTableView(this);
    45 	tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeMode::ResizeToContents);
    45 	tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeMode::ResizeToContents);
    46 	tableView->setModel(currentModel);
    46 	tableView->setModel(currentModel);
    47 
    47 
    48 	if (currentChartWidget) currentChartWidget->endOfRelation();
    48 	if (currentChartWidget) currentChartWidget->endOfRelation();
       
    49 	splitter = new QSplitter(Qt::Orientation::Vertical, tabs);
    49 	currentChartWidget = new RelpipeChartWidget(currentModel, splitter);
    50 	currentChartWidget = new RelpipeChartWidget(currentModel, splitter);
    50 	splitter->addWidget(currentChartWidget);
    51 	splitter->addWidget(currentChartWidget);
    51 	splitter->addWidget(tableView);
    52 	splitter->addWidget(tableView);
    52 	splitter->setSizes({currentChartWidget->hasChartData() ? 1 : 0, 1});
    53 	splitter->setSizes({currentChartWidget->hasChartData() ? 1 : 0, 1});
    53 	// splitter->setStretchFactor(currentChartWidget->hasChartData() ? 1 : 0, 1); // FIXME: 50:50 if chart is present
    54 	// splitter->setStretchFactor(currentChartWidget->hasChartData() ? 1 : 0, 1); // FIXME: 50:50 if chart is present