diff --git a/ApplicationLibCode/Commands/RicCalculatorWidgetCreator.cpp b/ApplicationLibCode/Commands/RicCalculatorWidgetCreator.cpp index 67436ada78..4b85800c38 100644 --- a/ApplicationLibCode/Commands/RicCalculatorWidgetCreator.cpp +++ b/ApplicationLibCode/Commands/RicCalculatorWidgetCreator.cpp @@ -152,8 +152,8 @@ QWidget* RicCalculatorWidgetCreator::createWidget( QWidget* parent ) rowSplitter->setContentsMargins( 0, 0, 0, 0 ); rowSplitter->setHandleWidth( 6 ); rowSplitter->setStyleSheet( "QSplitter::handle { image: url(:/SplitterV.png); }" ); - rowSplitter->insertWidget( 0, firstRowLeftFrame ); - rowSplitter->insertWidget( 1, firstRowRightFrame ); + rowSplitter->addWidget( firstRowLeftFrame ); + rowSplitter->addWidget( firstRowRightFrame ); rowSplitter->setSizes( QList() << 1 << 1 ); firstRowLayout->addWidget( rowSplitter ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp index fc46dd7cf4..09ef5657e4 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorWidgetCreator.cpp @@ -105,16 +105,16 @@ void RicSummaryPlotEditorWidgetCreator::recursivelyConfigureAndUpdateTopLevelUiO caf::PdmUiGroup* appearanceGroup = findGroupByKeyword( topLevelUiItems, RiuSummaryCurveDefinitionKeywords::appearance(), uiConfigName ); auto appearanceGroupBox = createGroupBoxWithContent( appearanceGroup, uiConfigName ); - m_lowerLeftLayout->insertWidget( 0, appearanceGroupBox ); + m_lowerLeftLayout->addWidget( appearanceGroupBox ); caf::PdmUiGroup* nameConfigGroup = findGroupByKeyword( topLevelUiItems, RiuSummaryCurveDefinitionKeywords::nameConfig(), uiConfigName ); auto nameConfigGroupBox = createGroupBoxWithContent( nameConfigGroup, uiConfigName ); - m_lowerLeftLayout->insertWidget( 1, nameConfigGroupBox ); + m_lowerLeftLayout->addWidget( nameConfigGroupBox ); QMinimizePanel* curveGroup = getOrCreateCurveTreeGroup(); - m_lowerLeftLayout->insertWidget( 2, curveGroup, 1 ); + m_lowerLeftLayout->addWidget( curveGroup, 1 ); m_lowerLeftLayout->addStretch( 0 ); - m_lowerRightLayout->insertWidget( 0, getOrCreatePlotWidget() ); + m_lowerRightLayout->addWidget( getOrCreatePlotWidget() ); // Fields at bottom of dialog configureAndUpdateFields( 1, m_bottomFieldLayout, topLevelUiItems, uiConfigName ); @@ -155,8 +155,8 @@ QWidget* RicSummaryPlotEditorWidgetCreator::createWidget( QWidget* parent ) m_firstColumnSplitter->setHandleWidth( 6 ); m_firstColumnSplitter->setStyleSheet( "QSplitter::handle { image: url(:/SplitterH.png); }" ); - m_firstColumnSplitter->insertWidget( 0, firstRowFrame ); - m_firstColumnSplitter->insertWidget( 1, secondRowFrame ); + m_firstColumnSplitter->addWidget( firstRowFrame ); + m_firstColumnSplitter->addWidget( secondRowFrame ); const int firstRowPixelHeight = 500; const int secondRowPixelHeight = 300; diff --git a/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionWidgetCreator.cpp b/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionWidgetCreator.cpp index beafa7a200..8ceefe88c5 100644 --- a/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionWidgetCreator.cpp +++ b/ApplicationLibCode/UserInterface/RiuSummaryVectorSelectionWidgetCreator.cpp @@ -129,8 +129,8 @@ QWidget* RiuSummaryVectorSelectionWidgetCreator::createWidget( QWidget* parent ) rowSplitter->setContentsMargins( 0, 0, 0, 0 ); rowSplitter->setHandleWidth( 6 ); rowSplitter->setStyleSheet( "QSplitter::handle { image: url(:/SplitterV.png); }" ); - rowSplitter->insertWidget( 0, firstRowLeftFrame ); - rowSplitter->insertWidget( 1, firstRowRightFrame ); + rowSplitter->addWidget( firstRowLeftFrame ); + rowSplitter->addWidget( firstRowRightFrame ); rowSplitter->setSizes( QList() << 1 << 1 ); firstRowLayout->addWidget( rowSplitter ); diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp index 428674510e..3df9c4de9e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiComboBoxEditor.cpp @@ -191,8 +191,8 @@ void PdmUiComboBoxEditor::configureAndUpdateUi( const QString& uiConfigName ) m_nextItemButton->setToolTip( "Next" ); } - m_layout->insertWidget( 1, m_previousItemButton ); - m_layout->insertWidget( 2, m_nextItemButton ); + m_layout->addWidget( m_previousItemButton ); + m_layout->addWidget( m_nextItemButton ); { QIcon toolButtonIcon; @@ -283,7 +283,7 @@ void PdmUiComboBoxEditor::configureAndUpdateUi( const QString& uiConfigName ) QString tooltipText = uiField()->isAutoValueEnabled() ? UiAppearanceSettings::globaleValueButtonText() : UiAppearanceSettings::localValueButtonText(); m_autoValueToolButton->setToolTip( tooltipText ); - m_layout->insertWidget( 3, m_autoValueToolButton ); + m_layout->addWidget(m_autoValueToolButton ); m_autoValueToolButton->show(); } else diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp index c8259369c0..e41572017f 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiLineEditor.cpp @@ -172,7 +172,7 @@ void PdmUiLineEditor::configureAndUpdateUi( const QString& uiConfigName ) : UiAppearanceSettings::localValueButtonText(); m_autoValueToolButton->setToolTip( tooltipText ); - m_layout->insertWidget( 1, m_autoValueToolButton ); + m_layout->addWidget( m_autoValueToolButton ); m_autoValueToolButton->show(); } else diff --git a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp index 42cb5dc353..2f1e25060e 100644 --- a/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafPdmUiPropertyView.cpp @@ -194,7 +194,7 @@ void PdmUiPropertyView::showProperties( PdmObjectHandle* object ) CAF_ASSERT( propertyWidget ); - this->m_placeHolderLayout->insertWidget( 0, propertyWidget ); + this->m_placeHolderLayout->addWidget( propertyWidget ); // Add stretch to make sure the property widget is not stretched this->m_placeHolderLayout->insertStretch( -1, 1 );