Skip to content
Permalink
Browse files

construct the QLayout for the child widget with the correct parent

This avoids a warning from qt about the widget already having a QLayout.
  • Loading branch information
SebDieBln committed Jan 10, 2016
1 parent e3f8abe commit cbb426b5f2588ef11c40ed1cb275b4120cc7b2b0
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/gui/qgsscalevisibilitydialog.cpp
@@ -36,7 +36,7 @@ QgsScaleVisibilityDialog::QgsScaleVisibilityDialog( QWidget *parent, const QStri
mGroupBox->setCheckable( true );
mGroupBox->setTitle( tr( "Scale visibility " ) );

QGridLayout* gbLayout = new QGridLayout( this );
QGridLayout* gbLayout = new QGridLayout( mGroupBox );
//gbLayout->setContentsMargins( 0, 0, 0, 0 );

mScaleWidget = new QgsScaleRangeWidget( this );
@@ -45,7 +45,6 @@ QgsScaleVisibilityDialog::QgsScaleVisibilityDialog( QWidget *parent, const QStri
mScaleWidget->setMapCanvas( mapCanvas );
}
gbLayout->addWidget( mScaleWidget, 0, 0 );
mGroupBox->setLayout( gbLayout );

QDialogButtonBox* buttonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Ok, Qt::Horizontal, this );
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );

0 comments on commit cbb426b

Please sign in to comment.
You can’t perform that action at this time.