MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / resizeExtraFlagsTable

Method resizeExtraFlagsTable

MiniZincIDE/configwindow.cpp:762–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

760}
761
762void ConfigWindow::resizeExtraFlagsTable()
763{
764 auto* hScroll = ui->extraParams_tableWidget->horizontalScrollBar();
765 // To avoid creating a vertical scrollbar if there's a horizontal one
766 int padding = hScroll ? hScroll->height() : 0;
767 int total_height = ui->extraParams_tableWidget->horizontalHeader()->height() + padding;
768 if (!ui->extraParams_tableWidget->horizontalScrollBar()->isHidden()) {
769 total_height += ui->extraParams_tableWidget->horizontalScrollBar()->height();
770 }
771 for (int row = 0; row < ui->extraParams_tableWidget->rowCount(); row++) {
772 total_height += ui->extraParams_tableWidget->rowHeight(row);
773 }
774 ui->extraParams_tableWidget->setMinimumHeight(total_height);
775}
776
777QWidget* ExtraOptionDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const
778{

Callers

nothing calls this directly

Calls 2

isHiddenMethod · 0.80
heightMethod · 0.45

Tested by

no test coverage detected