Skip to content

Commit 0afdede

Browse files
committedJan 5, 2015
Expand size of RelationReference when custom .ui is defined with a QWidget
Fix #11698
1 parent 48b1fc6 commit 0afdede

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/gui/editorwidgets/qgsrelationwidgetwrapper.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ void QgsRelationWidgetWrapper::initWidget( QWidget* editor )
4646
if ( !w )
4747
{
4848
w = new QgsRelationEditorWidget( editor );
49+
w->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
50+
if ( ! editor->layout() )
51+
{
52+
editor->setLayout( new QGridLayout() );
53+
}
54+
editor->layout()->addWidget( w );
4955
}
5056

5157
QgsAttributeEditorContext myContext( QgsAttributeEditorContext( context(), mRelation, QgsAttributeEditorContext::Multiple, QgsAttributeEditorContext::Embed ) );

0 commit comments

Comments
 (0)
Please sign in to comment.