Bug report #11646

Size bug in custom UI forms displaying sub-forms

Added by Médéric RIBREUX almost 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Forms
Affected QGIS version:2.6.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:19899

Description

Hello,

I've found a quite annoying bug in custom forms. It occurs only for custom forms that display sub-forms (the sub-forms can be autogenerated, drag'n drop or customized).
The size of the sub-form is limited to (approximatively) 258x277.

I've tried to change sizePolicy, minimumSize, size properties from all of the QWidgets that are the parent of the sub-form dedicated QWidget (QWidget that handle relation with qgisRelation property) but none of these changes made anything.
I've also tried to use QLayout objects but it also doesn't work. I tried to introspect into the custom-form (with a kind of dump method) and the drag'n drop one to find differences but I haven't seen any of them for the part that is related to the sub-form (which starts with a QGroupBox). It seems that the sub-form gets a fixed size (even if its properties tell something else).

I've found that when I manually move the size of the QGroupBox that embed the sub-form (with a Python Init function), I can resize it using the generic QWidget.resize() method.

I am not able to reproduce this bug with auto-generated or drag'n drop (parent) forms.

good_size_dragdrop_form_subform.png - Good size of the sub-form in drag'n drop parent form (45.9 KB) Médéric RIBREUX, 2014-11-14 07:03 AM

narrow_size_custom_form_subform.png - Too small size of the sub-form in custom parent form (41.7 KB) Médéric RIBREUX, 2014-11-14 07:03 AM

History

#1 Updated by Médéric RIBREUX over 9 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Hello,

As of QGIS 2.8.1, the bug is fixed ! No need to resize the sub-forms anymore.

Thanks to whoever has fixed this bug !

Also available in: Atom PDF