Basically we were applying the default values onComponentComplete therefore overriding any user value.

This patch applies the default on creation before properties are set so the user can now override.
This commit is contained in:
James Graham
2026-02-15 11:27:32 +00:00
parent a438173403
commit 89e5a605c4
2 changed files with 8 additions and 2 deletions

View File

@@ -109,9 +109,9 @@ void TimelineDelegate::geometryChange(const QRectF &newGeometry, const QRectF &o
QQuickItem::geometryChange(newGeometry, oldGeometry);
}
void TimelineDelegate::componentComplete()
void TimelineDelegate::classBegin()
{
QQuickItem::componentComplete();
QQuickItem::classBegin();
auto engine = qmlEngine(this);
Q_ASSERT(engine);
@@ -121,6 +121,11 @@ void TimelineDelegate::componentComplete()
connect(m_units, &Kirigami::Platform::Units::largeSpacingChanged, this, &TimelineDelegate::setCurveValues);
connect(m_units, &Kirigami::Platform::Units::smallSpacingChanged, this, &TimelineDelegate::setCurveValues);
setCurveValues();
}
void TimelineDelegate::componentComplete()
{
QQuickItem::componentComplete();
if (m_isDirty) {
resizeContent();

View File

@@ -95,6 +95,7 @@ protected:
bool m_resizingContent = false;
private:
void classBegin() override;
void componentComplete() override;
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
void updatePolish() override;