[Development] Issues with QFormBuilder - All properties modified & Invalid UI

Volker Hilsheimer volker.hilsheimer at qt.io
Tue Oct 29 10:55:23 CET 2019



> On 29 Oct 2019, at 10:23, Giuseppe D'Angelo via Development <development at qt-project.org> wrote:
> 
> Il 29/10/19 08:25, Friedemann Kleint ha scritto:
>>  > It is for sure a bug, so please report it. I'm not sure how much love
>> the widgets designer gets these days, though.
>> As explained before, it cannot be guaranteed that changing all
>> properties in random order works in Widgets.
> 
> I'm not really convinced of this. Properties that depend on each other are a symptom of bad design; we shouldn't discourage QFormBuilder because of this possible marginal issue.


Properties that depend on each other are not unusual. QWidget::x and QWidget::pos are properties that depend on QWidget::geometry.

But that’s why QWidget::x is read only, and why QWidget::pos is read/writeable, but flagged as “STORED false” in the metaobject (meaning that it’s just a view on some other property, not backed by its own data member).

Q(Abstract)FormBuilder doesn’t promise idempotence though, so extending the documentation to state that there’s no guarantee that loading the resulting .ui file will produce an identical GUI, and that the .ui file likely requires post-processing, seems to be the correct fix here.

Volker



More information about the Development mailing list