Skip to content

Commit e66dd99

Browse files
committed
Use full height on attribute form with drag and drop layout
And fix some file permission issues
1 parent 316210d commit e66dd99

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

python/gui/qgscolorswatchgrid.sip

100755100644
File mode changed.

python/gui/qgscolorwidgets.sip

100755100644
File mode changed.

src/gui/qgsattributeform.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -387,15 +387,16 @@ void QgsAttributeForm::init()
387387
// Tab layout
388388
if ( !formWidget && mLayer->editorLayout() == QgsVectorLayer::TabLayout )
389389
{
390-
QTabWidget* tabWidget = new QTabWidget( this );
390+
QTabWidget* tabWidget = new QTabWidget();
391391
layout()->addWidget( tabWidget );
392392

393393
Q_FOREACH ( QgsAttributeEditorElement *widgDef, mLayer->attributeEditorElements() )
394394
{
395395
QWidget* tabPage = new QWidget( tabWidget );
396396

397397
tabWidget->addTab( tabPage, widgDef->name() );
398-
QGridLayout *tabPageLayout = new QGridLayout( tabPage );
398+
QGridLayout* tabPageLayout = new QGridLayout();
399+
tabPage->setLayout( tabPageLayout );
399400

400401
if ( widgDef->type() == QgsAttributeEditorElement::AeTypeContainer )
401402
{
@@ -645,7 +646,7 @@ QWidget* QgsAttributeForm::createWidgetFromDef( const QgsAttributeEditorElement
645646
newWidget = scrollArea;
646647
}
647648

648-
QGridLayout* gbLayout = new QGridLayout( myContainer );
649+
QGridLayout* gbLayout = new QGridLayout();
649650
myContainer->setLayout( gbLayout );
650651

651652
int index = 0;
@@ -680,7 +681,9 @@ QWidget* QgsAttributeForm::createWidgetFromDef( const QgsAttributeEditorElement
680681

681682
++index;
682683
}
683-
gbLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ), index, 0 );
684+
QWidget* spacer = new QWidget();
685+
spacer->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
686+
gbLayout->addWidget( spacer, index, 0 );
684687

685688
labelText = QString::null;
686689
labelOnTop = true;

0 commit comments

Comments
 (0)