We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 21f0b4f commit bb21b4aCopy full SHA for bb21b4a
src/gui/qgsattributeform.cpp
@@ -351,7 +351,14 @@ void QgsAttributeForm::init()
351
formWidget = new QWidget( this );
352
QGridLayout* gridLayout = new QGridLayout( formWidget );
353
formWidget->setLayout( gridLayout );
354
- layout()->addWidget( formWidget );
+
355
+ // put the form into a scroll area to nicely handle cases with lots of attributes
356
+ QScrollArea* scrollArea = new QScrollArea( this );
357
+ scrollArea->setWidget( formWidget );
358
+ scrollArea->setWidgetResizable( true );
359
+ scrollArea->setFrameShape( QFrame::NoFrame );
360
+ scrollArea->setFrameShadow( QFrame::Plain );
361
+ layout()->addWidget( scrollArea );
362
363
int row = 0;
364
Q_FOREACH( const QgsField& field, mLayer->pendingFields().toList() )
0 commit comments