Details
Description
Overriding width and height in form editor has issues
The form editor allows to override the width and height of the root item.
This allows resizing the root item without reflecting this in QML.
Use cases:
- The size is 0x0 and QDS sets it to 640x480 so the form editor does show something.
- A component is entered and QDS uses the size of the instance
- The user sets a value to test resize behavior. The user want to edit the component in a different size without changing the QML.
Issues:
- When creating a new component, it can happen that the size is set to 640x480. Even if the component has a proper size it is still set to 640x480.
- When going into component the size is set even, if it is the same. e.g. 244x244 is the actual size and we still set the override size of 244x244 . This is confusing.
Solution:
- Set the override size only if it is different than the actual size.
- Remember that 640x480 was set implicitly and if the actual size is not 0x0 anymore remove the override size.