diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-15 03:03:57 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-15 03:03:57 +0200 |
commit | b92958a299221678ae3cac4d57d1a67cbaf0270d (patch) | |
tree | 6c3b6c7916f3c46cf9d81514968856d74dd137fc /src/chartsqml2/declarativecategoryaxis.cpp | |
parent | 26277a94e10b9bb542017be369c95f399eba6213 (diff) | |
parent | 88e67e7686fa564e81a770a18879cc281e620222 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I6d6b7e405d4023a17e49c001040894980dca0c95
Diffstat (limited to 'src/chartsqml2/declarativecategoryaxis.cpp')
-rw-r--r-- | src/chartsqml2/declarativecategoryaxis.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/chartsqml2/declarativecategoryaxis.cpp b/src/chartsqml2/declarativecategoryaxis.cpp index 1b1826fd..8f6a2b20 100644 --- a/src/chartsqml2/declarativecategoryaxis.cpp +++ b/src/chartsqml2/declarativecategoryaxis.cpp @@ -64,6 +64,14 @@ DeclarativeCategoryRange::DeclarativeCategoryRange(QObject *parent) : { } +void DeclarativeCategoryRange::setLabel(const QString &label) +{ + auto catAxis = qobject_cast<QCategoryAxis *>(parent()); + if (catAxis) + catAxis->replaceLabel(m_label, label); + m_label = label; +} + DeclarativeCategoryAxis::DeclarativeCategoryAxis(QObject *parent) : QCategoryAxis(parent), m_labelsPosition(AxisLabelsPositionCenter) |