> And there you have it: QFormBuilder mustn't save non-STORED properties.
> If it does, it's a bug. And if we have some widget with interlinked
> properties that are not clearly marked as non-STORED, or refactored to
> be grouped together in a proper datatype, that's another bug.

Take any of QWidget's properties, e.g. sizePolicy, grep through qt sources
and search where setSizePolicy is used - QAbstractSlider::setOrientation(),
so "orientation" property of abstract slider influences "sizePolicy" - 
non-orthogonality detected.
If you store both properties, and then read them - the result depend on the 
read order.

QWidget::cursor, modified by QLineEdit::setReadOnly
QWidget::focusPolicy, modified by QGroupBox::setCheckable
...

There are really hundrets of these cases...

________________________________________
From: Development <[email protected]> on behalf of Giuseppe 
D'Angelo via Development <[email protected]>
Sent: Tuesday, October 29, 2019 11:00 AM
To: Volker Hilsheimer
Cc: [email protected]
Subject: Re: [Development] Issues with QFormBuilder - All properties modified & 
Invalid UI

Il 29/10/19 10:55, Volker Hilsheimer ha scritto:
> 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).

And there you have it: QFormBuilder mustn't save non-STORED properties.
If it does, it's a bug. And if we have some widget with interlinked
properties that are not clearly marked as non-STORED, or refactored to
be grouped together in a proper datatype, that's another bug.


> 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.

Then I fail to see the usefulness of QFormBuilder apart from being minor
convenience, and therefore it should be overall deprecated.

My 2 c,
--
Giuseppe D'Angelo | [email protected] | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to