The limited drag mode used absolute mouse position to compute the
value (min + xPercent * range), causing an immediate jump away from
the property's current value at drag start. Unify both modes to use
the relative offset formula (number + offset * step), with the
limited mode only adding min/max clamping on top. Also removes the
cursor-constraining logic that was specific to the old absolute mode.
resloveMetaData() only matched Q_CLASSINFO against the first segment of
the property path (e.g. "ptPosition" from "ptPosition.x"), so child
handles like x/y under a QPointF tree never picked up Min/Max/Step
metadata declared with Q_CLASSINFO("x", ...). This caused the x/y
NumberBox editors to fall back to numeric_limits min/max, clamping
negative values to ~0.
Now iterates path segments from most specific (last) to least specific
(first), so child property names correctly match their Q_CLASSINFO
annotations.
Also add Q_CLASSINFO("x"/"y", "Min=-1000,Max=1000,Step=1") on
GraphicsTextItem to constrain position editing to a reasonable range.
Add PropertyTypeCustomization_PointF that renders QPointF as an
expandable tree row: collapsed header shows formatted "(x, y)" text,
expanded children provide NumberBox editing for x and y coordinates.
Registered in mMetaTypeCustomizationMap alongside the existing QFont
customization, reusing the RawType branch of getCustomPropertyType().
Add FontBox QML editor for QFont properties — collapsed display shows
"family, size pt", expanded inline dropdown provides family ComboBox
(populated from QFontDatabase), compact +/- size buttons, and
Bold/Italic/Underline toggles.
QFont is a Q_GADGET type classified as Object by parserType(), so it
requires both a PropertyTypeCustomization_Font (overrides
customizeHeaderRow to create the value editor, customizeChildren as
no-op) and a mMetaTypeCustomizationMap entry — the Object branch of
getCustomPropertyType() is extended to check this map first.
Also fix property name column to always top-align (anchors.top +
implicitHeight) so it stays fixed when inline editors like FontBox
expand vertically, rather than drifting to row center.
Files (8 changed):
- resources/Qml/ValueEditor/FontBox.qml (new)
- source/src/Customization/PropertyTypeCustomization_Font.h (new)
- source/src/Customization/PropertyTypeCustomization_Font.cpp (new)
- resources.qrc
- source/src/QQuickDetailsViewBasicTypeEditor.cpp
- source/src/QQuickDetailsViewMananger.cpp
- source/src/QQuickDetailsViewLayoutBuilder.cpp
- source/src/PropertyHandleImpl/IPropertyHandleImpl.cpp
- Mark 27 overriding functions with 'override' across GraphicsItemGroup,
GraphicsRectItem, and GraphicPolygonItem headers
- Add virtual destructor to IPropertyHandleImpl (fixes -Wdelete-abstract-non-virtual-dtor)
- Build is now 0 warnings, 0 errors