Use setContentsMargins instead of setMargin

This commit is contained in:
Magne Sjaastad 2024-01-05 13:11:08 +01:00
parent 50234f0ea8
commit e23560d9a0
13 changed files with 13 additions and 15 deletions

View File

@ -403,7 +403,6 @@ void QMinimizePanel::initialize( const QString& title )
{
m_titleLabel = new QLabel( title );
QPalette titleLabelPalette = m_titleLabel->palette();
titleLabelPalette.setBrush( QPalette::WindowText, titleLabelPalette.windowText() );
m_titleLabel->setPalette( titleLabelPalette );
titleLayout->addWidget( m_titleLabel, 1, Qt::AlignLeft );
}

View File

@ -117,7 +117,7 @@ QWidget* PdmUiActionPushButtonEditor::createEditorWidget( QWidget* parent )
m_buttonLayout = new QHBoxLayout( containerWidget );
m_buttonLayout->addWidget( m_pushButton );
m_buttonLayout->setMargin( 0 );
m_buttonLayout->setContentsMargins( 0, 0, 0, 0 );
m_buttonLayout->setSpacing( 0 );
containerWidget->setLayout( m_buttonLayout );

View File

@ -110,7 +110,7 @@ QWidget* PdmUiCheckBoxAndTextEditor::createEditorWidget( QWidget* parent )
layout->addWidget( m_checkBox );
layout->addWidget( m_lineEdit );
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
containerWidget->setLayout( layout );

View File

@ -107,7 +107,7 @@ QWidget* PdmUiDoubleSliderEditor::createEditorWidget( QWidget* parent )
QWidget* containerWidget = new QWidget( parent );
QHBoxLayout* layout = new QHBoxLayout();
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
containerWidget->setLayout( layout );
m_lineEdit = new QLineEdit( containerWidget );

View File

@ -116,7 +116,7 @@ QWidget* PdmUiDoubleValueEditor::createEditorWidget( QWidget* parent )
QWidget* containerWidget = new QWidget( parent );
QHBoxLayout* layout = new QHBoxLayout();
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
containerWidget->setLayout( layout );
m_lineEdit = new QLineEdit( containerWidget );

View File

@ -43,13 +43,13 @@
#include <QLineEdit>
#include <QPointer>
#include <QString>
#include <QStringListModel>
#include <QToolButton>
#include <QValidator>
#include <QWidget>
class QGridLayout;
class QCompleter;
class QStringListModel;
namespace caf
{

View File

@ -38,12 +38,12 @@
#include "cafPdmUiFieldEditorHandle.h"
#include <QStringListModel>
class QItemSelection;
class QLabel;
class QListViewHeightHint;
class QModelIndex;
class QStringList;
class QStringListModel;
namespace caf
{

View File

@ -143,7 +143,7 @@ QWidget* PdmUiPushButtonEditor::createEditorWidget( QWidget* parent )
m_buttonLayout = new QHBoxLayout( containerWidget );
m_buttonLayout->addWidget( m_pushButton );
m_buttonLayout->setMargin( 0 );
m_buttonLayout->setContentsMargins( 0, 0, 0, 0 );
m_buttonLayout->setSpacing( 0 );
containerWidget->setLayout( m_buttonLayout );

View File

@ -104,7 +104,7 @@ QWidget* PdmUiSliderEditor::createEditorWidget( QWidget* parent )
QWidget* containerWidget = new QWidget( parent );
QHBoxLayout* layout = new QHBoxLayout();
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
containerWidget->setLayout( layout );
m_spinBox = new QSpinBox( containerWidget );

View File

@ -11,7 +11,6 @@ class PdmUiPropertyView;
class QDialogButtonBox;
class QWidget;
class QString;
class QStringList;
namespace caf
{
@ -35,4 +34,4 @@ private:
QDialogButtonBox* m_dialogButtonBox;
};
} // namespace caf
} // namespace caf

View File

@ -160,7 +160,7 @@ QWidget* PdmUiTableViewEditor::createLabelWidget( QWidget* parent )
}
QHBoxLayout* layoutForIconLabel = new QHBoxLayout();
layoutForIconLabel->setMargin( 0 );
layoutForIconLabel->setContentsMargins( 0, 0, 0, 0 );
layoutForIconLabel->addWidget( m_tableHeadingIcon );
layoutForIconLabel->addSpacing( 3 );
layoutForIconLabel->addWidget( m_tableHeading );

View File

@ -184,7 +184,7 @@ QWidget* PdmUiTextEditor::createEditorWidget( QWidget* parent )
QVBoxLayout* layout = new QVBoxLayout;
layout->addWidget( m_textEdit );
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
QHBoxLayout* buttonLayout = new QHBoxLayout;
buttonLayout->insertStretch( 0, 10 );

View File

@ -259,7 +259,7 @@ QWidget* PdmUiValueRangeEditor::createEditorWidget( QWidget* parent )
auto containerWidget = new QWidget( parent );
auto layout = new QGridLayout();
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
containerWidget->setLayout( layout );
m_lineEditMin = new QLineEdit( containerWidget );