Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-charts for openSUSE:Factory checked in at 2023-10-02 20:05:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-charts (Old) and /work/SRC/openSUSE:Factory/.qt6-charts.new.28202 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-charts" Mon Oct 2 20:05:25 2023 rev:21 rq:1114487 version:6.5.3 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-charts/qt6-charts.changes 2023-07-26 13:22:48.799608532 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-charts.new.28202/qt6-charts.changes 2023-10-02 20:07:05.528154613 +0200 @@ -1,0 +2,6 @@ +Thu Sep 28 07:34:07 UTC 2023 - Christophe Marin <christo...@krop.fr> + +- Update to 6.5.3 + * https://www.qt.io/blog/qt-6.5.3-released + +------------------------------------------------------------------- Old: ---- qtcharts-everywhere-src-6.5.2.tar.xz New: ---- qtcharts-everywhere-src-6.5.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-charts.spec ++++++ --- /var/tmp/diff_new_pack.78yGcH/_old 2023-10-02 20:07:06.704196908 +0200 +++ /var/tmp/diff_new_pack.78yGcH/_new 2023-10-02 20:07:06.704196908 +0200 @@ -16,7 +16,7 @@ # -%define real_version 6.5.2 +%define real_version 6.5.3 %define short_version 6.5 %define short_name qtcharts %define tar_name qtcharts-everywhere-src @@ -28,17 +28,18 @@ %endif # Name: qt6-charts%{?pkg_suffix} -Version: 6.5.2 +Version: 6.5.3 Release: 0 Summary: Qt 6 Charts library License: GPL-3.0-or-later URL: https://www.qt.io -Source: https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz +Source: https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz Source99: qt6-charts-rpmlintrc BuildRequires: pkgconfig BuildRequires: qt6-core-private-devel BuildRequires: cmake(Qt6Core) = %{real_version} BuildRequires: cmake(Qt6Gui) = %{real_version} +BuildRequires: cmake(Qt6Multimedia) = %{real_version} BuildRequires: cmake(Qt6OpenGL) = %{real_version} BuildRequires: cmake(Qt6OpenGLWidgets) = %{real_version} BuildRequires: cmake(Qt6Qml) = %{real_version} ++++++ qtcharts-everywhere-src-6.5.2.tar.xz -> qtcharts-everywhere-src-6.5.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/.cmake.conf new/qtcharts-everywhere-src-6.5.3/.cmake.conf --- old/qtcharts-everywhere-src-6.5.2/.cmake.conf 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/.cmake.conf 2023-09-24 13:38:45.000000000 +0200 @@ -1,3 +1,3 @@ -set(QT_REPO_MODULE_VERSION "6.5.2") +set(QT_REPO_MODULE_VERSION "6.5.3") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/.tag new/qtcharts-everywhere-src-6.5.3/.tag --- old/qtcharts-everywhere-src-6.5.2/.tag 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/.tag 2023-09-24 13:38:45.000000000 +0200 @@ -1 +1 @@ -ba7ce32a4d03b7e772059ae1f8e4936cf7d11d8e +4ef5a39624a48937cbf6e03f2509814a5fdec7d2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/CMakeLists.txt new/qtcharts-everywhere-src-6.5.3/CMakeLists.txt --- old/qtcharts-everywhere-src-6.5.2/CMakeLists.txt 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/CMakeLists.txt 2023-09-24 13:38:45.000000000 +0200 @@ -17,7 +17,7 @@ set(QT_USE_FIXED_QT_ADD_RESOURCE_BASE TRUE) find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) # special case -find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Widgets OpenGL OpenGLWidgets MultiMedia Quick Qml QuickTest Test) # special case +find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Widgets OpenGL OpenGLWidgets Multimedia Quick Qml QuickTest Test) # special case qt_internal_project_setup() #special case begin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/dependencies.yaml new/qtcharts-everywhere-src-6.5.3/dependencies.yaml --- old/qtcharts-everywhere-src-6.5.2/dependencies.yaml 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/dependencies.yaml 2023-09-24 13:38:45.000000000 +0200 @@ -1,10 +1,10 @@ dependencies: ../qtbase: - ref: af457a9f0f7eb1a2a7d11f495da508faab91a442 + ref: 372eaedc5b8c771c46acc4c96e91bbade4ca3624 required: true ../qtdeclarative: - ref: f289063ff19588a11dd79213632785cfda2909a0 + ref: e00c258fa5a4e122636d441967dea035865fac5d required: false ../qtmultimedia: - ref: ca330332aae05023983dcf445f0b388070289c51 + ref: 0762bb1e91495527f0978232212521c49291f7de required: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/CMakeLists.txt new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/CMakeLists.txt --- old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/CMakeLists.txt 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/CMakeLists.txt 2023-09-24 13:38:45.000000000 +0200 @@ -23,7 +23,7 @@ set_target_properties(audio PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/apple/Info.plist.in" + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/apple/Info.cmake.plist" ) target_link_libraries(audio PUBLIC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/apple/Info.cmake.plist new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/apple/Info.cmake.plist --- old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/apple/Info.cmake.plist 1970-01-01 01:00:00.000000000 +0100 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/apple/Info.cmake.plist 2023-09-24 13:38:45.000000000 +0200 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + + <key>CFBundlePackageType</key> + <string>APPL</string> + + <key>CFBundleName</key> + <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string> + + <key>CFBundleDisplayName</key> + <string>${QT_INTERNAL_DOLLAR_VAR}{PRODUCT_NAME}</string> + + <key>CFBundleIdentifier</key> + <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string> + + <key>CFBundleExecutable</key> + <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string> + + <key>CFBundleVersion</key> + <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> + + <key>CFBundleShortVersionString</key> + <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string> + + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + + <key>NSMicrophoneUsageDescription</key> + <string>Qt Charts Example needs access to microphone</string> + + <key>NSSupportsAutomaticGraphicsSwitching</key> + <true/> +</dict> +</plist> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/apple/Info.plist.in new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/apple/Info.plist.in --- old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/apple/Info.plist.in 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/apple/Info.plist.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - - <key>NSMicrophoneUsageDescription</key> - <string>Qt Charts Example</string> -</dict> -</plist> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/apple/Info.qmake.plist new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/apple/Info.qmake.plist --- old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/apple/Info.qmake.plist 1970-01-01 01:00:00.000000000 +0100 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/apple/Info.qmake.plist 2023-09-24 13:38:45.000000000 +0200 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + + <key>CFBundlePackageType</key> + <string>APPL</string> + + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + + <key>CFBundleDisplayName</key> + <string>${PRODUCT_NAME}</string> + + <key>CFBundleIdentifier</key> + <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> + + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + + <key>CFBundleVersion</key> + <string>${QMAKE_FULL_VERSION}</string> + + <key>CFBundleShortVersionString</key> + <string>${QMAKE_SHORT_VERSION_STRING}</string> + + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + + <key>NSMicrophoneUsageDescription</key> + <string>Qt Charts Example needs access to microphone</string> + + <key>NSSupportsAutomaticGraphicsSwitching</key> + <true/> +</dict> +</plist> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/audio.pro new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/audio.pro --- old/qtcharts-everywhere-src-6.5.2/examples/charts/audio/audio.pro 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/audio/audio.pro 2023-09-24 13:38:45.000000000 +0200 @@ -9,5 +9,9 @@ widget.cpp \ xyseriesiodevice.cpp +darwin{ + QMAKE_INFO_PLIST = apple/Info.qmake.plist +} + target.path = $$[QT_INSTALL_EXAMPLES]/charts/audio INSTALLS += target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/chartsgallery/doc/src/examples-openglseries.qdoc new/qtcharts-everywhere-src-6.5.3/examples/charts/chartsgallery/doc/src/examples-openglseries.qdoc --- old/qtcharts-everywhere-src-6.5.2/examples/charts/chartsgallery/doc/src/examples-openglseries.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/chartsgallery/doc/src/examples-openglseries.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -4,6 +4,7 @@ /*! \example openglseries \title OpenGL Accelerated Series Example + \examplecategory {Data Visualization & 3D} \ingroup qtcharts_examples \brief The example shows how to enable OpenGL acceleration for QLineSeries and QScatterSeries. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/chartsgallery/doc/src/gallery.qdoc new/qtcharts-everywhere-src-6.5.3/examples/charts/chartsgallery/doc/src/gallery.qdoc --- old/qtcharts-everywhere-src-6.5.2/examples/charts/chartsgallery/doc/src/gallery.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/chartsgallery/doc/src/gallery.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -1,11 +1,11 @@ -// Copyright (C) 2023 The Qt Company Ltd. + // Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \example chartsgallery \title Charts with Widgets Gallery \ingroup qtcharts_examples - +\examplecategory {Data Visualization & 3D} \brief An application that demonstrates the Qt Charts Widgets API. \image ChartWidgetGallery.png diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/chartsgallery/mainwidget.cpp new/qtcharts-everywhere-src-6.5.3/examples/charts/chartsgallery/mainwidget.cpp --- old/qtcharts-everywhere-src-6.5.2/examples/charts/chartsgallery/mainwidget.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/chartsgallery/mainwidget.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -48,6 +48,7 @@ #include <QListView> #include <QModelIndex> #include <QStringListModel> +#include <QVBoxLayout> #include <algorithm> @@ -100,19 +101,15 @@ std::sort(examples.begin(), examples.end()); m_listModel->setStringList(examples); - m_listView->setMaximumWidth(220); m_listView->setModel(m_listModel); m_listView->setCurrentIndex(m_listModel->index(0)); m_listView->setEditTriggers(QAbstractItemView::NoEditTriggers); + m_contentArea->installEventFilter(this); + setMinimumSize(800, 400); resize(1200, 600); - auto layout = new QHBoxLayout(this); - layout->addWidget(m_listView); - layout->addWidget(m_contentArea); - setLayout(layout); - connect(m_listView->selectionModel(), &QItemSelectionModel::currentChanged, this, [this](const QModelIndex &index) { setActiveExample(m_exampleMap[m_listModel->data(index).toString()]); @@ -127,7 +124,21 @@ void MainWidget::resizeEvent(QResizeEvent *) { - m_activeWidget->resize(m_contentArea->size()); + bool isHorizontal = width() >= height(); + if (!layout() || isHorizontal != m_isHorizontal) + relayout(isHorizontal); + + if (m_isHorizontal) + m_listView->setMaximumHeight(QWIDGETSIZE_MAX); + else + m_listView->setMaximumHeight(height() / 3); +} + +bool MainWidget::eventFilter(QObject *object, QEvent *event) +{ + if (event->type() == QEvent::Resize && object == m_contentArea && m_activeWidget) + m_activeWidget->resize(m_contentArea->size()); + return QObject::eventFilter(object, event); } void MainWidget::setActiveExample(Example example) @@ -260,3 +271,24 @@ m_activeWidget->resize(m_contentArea->size()); m_activeWidget->setVisible(true); } + +void MainWidget::relayout(bool horizontal) +{ + m_isHorizontal = horizontal; + + delete layout(); + + QBoxLayout *layout; + if (horizontal) { + layout = new QHBoxLayout(this); + layout->addWidget(m_listView); + layout->addWidget(m_contentArea); + m_listView->setMaximumWidth(220); + } else { + layout = new QVBoxLayout(this); + layout->addWidget(m_contentArea); + layout->addWidget(m_listView); + m_listView->setMaximumWidth(QWIDGETSIZE_MAX); + } + setLayout(layout); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/chartsgallery/mainwidget.h new/qtcharts-everywhere-src-6.5.3/examples/charts/chartsgallery/mainwidget.h --- old/qtcharts-everywhere-src-6.5.2/examples/charts/chartsgallery/mainwidget.h 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/chartsgallery/mainwidget.h 2023-09-24 13:38:45.000000000 +0200 @@ -20,6 +20,7 @@ protected: void resizeEvent(QResizeEvent *) override; + bool eventFilter(QObject *object, QEvent *event) override; private: enum Example { @@ -64,12 +65,14 @@ }; void setActiveExample(Example example); + void relayout(bool horizontal); QListView *m_listView = nullptr; QStringListModel *m_listModel = nullptr; QWidget *m_contentArea = nullptr; ContentWidget *m_activeWidget = nullptr; QHash<QString, Example> m_exampleMap; + bool m_isHorizontal = false; }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/qmlchartsgallery/doc/src/qmlchartsgallery.qdoc new/qtcharts-everywhere-src-6.5.3/examples/charts/qmlchartsgallery/doc/src/qmlchartsgallery.qdoc --- old/qtcharts-everywhere-src-6.5.2/examples/charts/qmlchartsgallery/doc/src/qmlchartsgallery.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/qmlchartsgallery/doc/src/qmlchartsgallery.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -5,7 +5,7 @@ \example qmlchartsgallery \title Charts with QML Gallery \ingroup qtcharts_examples - + \examplecategory {Data Visualization & 3D} \brief Demonstrates how to use the different chart types by using qml. \image QMLChartsGallery.png diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/examples/charts/qmlchartsgallery/qml/Main.qml new/qtcharts-everywhere-src-6.5.3/examples/charts/qmlchartsgallery/qml/Main.qml --- old/qtcharts-everywhere-src-6.5.2/examples/charts/qmlchartsgallery/qml/Main.qml 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/examples/charts/qmlchartsgallery/qml/Main.qml 2023-09-24 13:38:45.000000000 +0200 @@ -10,14 +10,18 @@ color: "#f0f0f0" - Row { - id: row - padding: 8 - spacing: 8 + property bool isHorizontalView: root.width >= root.height + + Item { + anchors.fill: parent + anchors.margins: 8 Rectangle { - width: 200 - height: root.height - row.padding * 2 + id: listRect + width: isHorizontalView ? 200 : parent.width + height: isHorizontalView ? parent.height : parent.height / 3 + x: 0 + y: isHorizontalView ? 0 : parent.height - height border.width: 1 ListView { @@ -26,6 +30,7 @@ anchors.fill: parent anchors.margins: 1 highlightMoveDuration: 250 + highlightResizeDuration: 0 orientation: ListView.Vertical boundsBehavior: Flickable.StopAtBounds currentIndex: 0 @@ -147,16 +152,15 @@ } Rectangle { - height: root.height - row.padding * 2 - width: root.width - listView.width - row.spacing - row.padding * 2 + width: isHorizontalView ? parent.width - listView.width - 8 : parent.width + height: isHorizontalView ? parent.height : parent.height - listView.height - 8 radius: 5 + x: isHorizontalView ? 208 : 0 + y: 0 clip: true Loader { - id: loader anchors.fill: parent - anchors.margins: 4 - asynchronous: true source: listView.currentItem.source } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/axis/coloraxis/chartcoloraxisy.cpp new/qtcharts-everywhere-src-6.5.3/src/charts/axis/coloraxis/chartcoloraxisy.cpp --- old/qtcharts-everywhere-src-6.5.2/src/charts/axis/coloraxis/chartcoloraxisy.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/axis/coloraxis/chartcoloraxisy.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -39,7 +39,7 @@ void ChartColorAxisY::updateGeometry() { - setLabels(createColorLabels(min(), max(), m_axis->tickCount()) << QString()); + setLabels(createColorLabels(min(), max(), m_axis->tickCount())); VerticalAxis::updateGeometry(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/barchart/vertical/bar/qbarseries.cpp new/qtcharts-everywhere-src-6.5.3/src/charts/barchart/vertical/bar/qbarseries.cpp --- old/qtcharts-everywhere-src-6.5.2/src/charts/barchart/vertical/bar/qbarseries.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/barchart/vertical/bar/qbarseries.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -19,7 +19,8 @@ This class draws data as a series of vertical bars grouped by category, with one bar per category from each bar set added to the series. - See the \l {BarChart Example} {bar chart example} to learn how to create a grouped bar chart. + See the \l {Creating Bar Charts} {bar chart example} to learn how to create + a grouped bar chart. \image examples_barchart.png \sa QBarSet, QPercentBarSeries, QAbstractBarSeries, QStackedBarSeries @@ -36,12 +37,10 @@ The data is drawn as a series of vertical bars grouped by category, with one bar per category from each bar set added to the series. - The following QML code snippet shows how to create a simple grouped bar chart: - \snippet qmlchart/qml/qmlchart/View6.qml 1 - \beginfloatleft + The following QML code snippet shows how to create a simple grouped bar + chart: + \snippet qmlchartsgallery/qml/BarSeries.qml 1 \image examples_qmlchart6.png - \endfloat - \clearfloat */ /*! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/boxplotchart/boxwhiskers_p.h new/qtcharts-everywhere-src-6.5.3/src/charts/boxplotchart/boxwhiskers_p.h --- old/qtcharts-everywhere-src-6.5.2/src/charts/boxplotchart/boxwhiskers_p.h 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/boxplotchart/boxwhiskers_p.h 2023-09-24 13:38:45.000000000 +0200 @@ -70,10 +70,8 @@ AbstractDomain *m_domain; QPainterPath m_boxPath; QRectF m_boundingRect; - QT_WARNING_PUSH - QT_WARNING_DISABLE_GCC("-Wattributes") - [[maybe_unused]] bool m_hovering; - QT_WARNING_POP + Q_DECL_UNUSED_MEMBER + bool m_hovering; bool m_validData; QBrush m_brush; QPen m_pen; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/examples-audio.qdoc new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/examples-audio.qdoc --- old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/examples-audio.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/examples-audio.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -5,7 +5,7 @@ \example audio \title Audio Samples vs Sound Level \ingroup qtcharts_examples - + \examplecategory {Data Visualization & 3D} \brief This example shows the drawing of microphone samples vs audio level. \image examples_audio.png diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/examples-qmloscilloscope.qdoc new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/examples-qmloscilloscope.qdoc --- old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/examples-qmloscilloscope.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/examples-qmloscilloscope.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -5,7 +5,7 @@ \example qmloscilloscope \title Qml Oscilloscope \ingroup qtcharts_examples - + \examplecategory {Data Visualization & 3D} \image examples_qmloscilloscope.png \brief The example shows how to implement application with strict performance requirements diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/examples-qmlweather.qdoc new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/examples-qmlweather.qdoc --- old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/examples-qmlweather.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/examples-qmlweather.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -5,7 +5,7 @@ \example qmlweather \title Qml Weather \ingroup qtcharts_examples - + \examplecategory {Data Visualization & 3D} \image examples_qmlweather.png \brief This is a basic demonstration showing how to use the different chart types by using qml. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/examples-zoomlinechart.qdoc new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/examples-zoomlinechart.qdoc --- old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/examples-zoomlinechart.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/examples-zoomlinechart.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -5,7 +5,7 @@ \example zoomlinechart \title Zoom Line Example \ingroup qtcharts_examples - + \examplecategory {Data Visualization & 3D} \brief The example shows how to create your own custom zooming effect. The example shows how to create your own custom zooming effect with QRubberBand by using a mouse diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/index.qdoc new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/index.qdoc --- old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/index.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/index.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -11,6 +11,14 @@ types. Users can easily create impressive charts by selecting one of the themes. + The Qt Charts QML API is an intuitive and simple way to show charts in your + QML applications. + + This example shows how to create a simple line chart: + + \image examples_qmlchart2.png + \snippet qmlchartsgallery/qml/LineSeries.qml 1 + \section1 Using the Module \section2 QML API diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/qtcharts-overview.qdoc new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/qtcharts-overview.qdoc --- old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/qtcharts-overview.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/qtcharts-overview.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -5,6 +5,7 @@ \page qtcharts-overview.html \title Qt Charts Overview \brief Visualizing data as 2D charts. + \ingroup explanations-graphicsandmultimedia Qt Charts enables creating stylish, interactive, data centric user interfaces. Qt Charts uses the \l {Graphics View Framework} for ease of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/qtcharts.qdoc new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/qtcharts.qdoc --- old/qtcharts-everywhere-src-6.5.2/src/charts/doc/src/qtcharts.qdoc 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/doc/src/qtcharts.qdoc 2023-09-24 13:38:45.000000000 +0200 @@ -41,24 +41,14 @@ \brief QML types for the Qt Charts API. - The Qt Charts QML API is an intuitive and simple way to show charts in your QML - applications. - - Use the following QML to create a simple pie chart: - \image examples_qmlpiechart.png - \snippet qmlpiechart/qml/qmlpiechart/main.qml 1 - \snippet qmlpiechart/qml/qmlpiechart/main.qml 2 - - \note Since Qt Creator 3.0 the project created with Qt Quick Application wizard based on - Qt Quick 2 template uses QGuiApplication by default. As Qt Charts utilizes Qt Graphics View - Framework for drawing, QApplication must be used. The project created with the wizard is usable with Qt Charts after the QGuiApplication is replaced with QApplication. + The Qt Charts QML API is an intuitive and simple way to show charts in your + QML applications. \section1 QML Types */ /*! \group qtcharts_examples - \ingroup all-examples \title Qt Charts Examples \brief Examples for the Qt Charts. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/legend/qlegend.cpp new/qtcharts-everywhere-src-6.5.3/src/charts/legend/qlegend.cpp --- old/qtcharts-everywhere-src-6.5.2/src/charts/legend/qlegend.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/legend/qlegend.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -55,8 +55,9 @@ \image examples_percentbarchart_legend.png - \note There is no QML API available for modifying legend markers. Markers can be modified by - creating a custom legend, as illustrated by \l {qmlcustomlegend}{Qml Custom Example}. + \note There is no QML API available for modifying legend markers. Markers + can be modified by creating a custom legend. For more information, see + \l {Using Legend Markers}. */ /*! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/linechart/qlineseries.cpp new/qtcharts-everywhere-src-6.5.3/src/charts/linechart/qlineseries.cpp --- old/qtcharts-everywhere-src-6.5.2/src/charts/linechart/qlineseries.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/linechart/qlineseries.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -41,7 +41,7 @@ connected by straight lines. The following QML example shows how to create a simple line chart: - \snippet qmlchartsgallery/qml/PieChart.qml + \snippet qmlchartsgallery/qml/LineSeries.qml 1 \beginfloatleft \image examples_qmlchart2.png \endfloat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/piechart/qpieseries.cpp new/qtcharts-everywhere-src-6.5.3/src/charts/piechart/qpieseries.cpp --- old/qtcharts-everywhere-src-6.5.2/src/charts/piechart/qpieseries.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/piechart/qpieseries.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -64,7 +64,7 @@ The following QML example shows how to create a simple pie chart. - \snippet qmlchart/qml/qmlchart/View1.qml 1 + \snippet qmlchartsgallery/qml/PieChart.qml 1 \beginfloatleft \image examples_qmlchart1.png diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/scatterchart/qscatterseries.cpp new/qtcharts-everywhere-src-6.5.3/src/charts/scatterchart/qscatterseries.cpp --- old/qtcharts-everywhere-src-6.5.2/src/charts/scatterchart/qscatterseries.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/scatterchart/qscatterseries.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -30,7 +30,7 @@ \endcode For more information, see \l{Charts with Widgets Gallery} and - \l {Scatter Interactions Example}. + \l {Creating Scatter Charts}. */ /*! \qmltype ScatterSeries diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/scatterchart/scatterchartitem.cpp new/qtcharts-everywhere-src-6.5.3/src/charts/scatterchart/scatterchartitem.cpp --- old/qtcharts-everywhere-src-6.5.2/src/charts/scatterchart/scatterchartitem.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/scatterchart/scatterchartitem.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -275,8 +275,11 @@ } } - if (m_series->isPointSelected(i)) + if (m_series->isPointSelected(i)) { drawPoint = m_series->selectedLightMarker().isNull(); + if (drawPoint && m_selectedColor.isValid()) + item->setBrush(m_selectedColor); + } item->setVisible(drawPoint); } @@ -508,6 +511,14 @@ update(); } +void ScatterChartItem::handleMarkerMouseReleaseEvent(QGraphicsItem *item) +{ + markerReleased(item); + if (mousePressed()) + markerSelected(item); + setMousePressed(false); +} + template<class T> ChartMarker<T>::ChartMarker(qreal x, qreal y, qreal w, qreal h, ScatterChartItem *parent) : T(x, y, w, h, parent) @@ -552,10 +563,7 @@ void ChartMarker<T>::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { T::mouseReleaseEvent(event); - m_parent->markerReleased(this); - if (m_parent->mousePressed()) - m_parent->markerSelected(this); - m_parent->setMousePressed(false); + m_parent->handleMarkerMouseReleaseEvent(this); } template<class T> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/scatterchart/scatterchartitem_p.h new/qtcharts-everywhere-src-6.5.3/src/charts/scatterchart/scatterchartitem_p.h --- old/qtcharts-everywhere-src-6.5.2/src/charts/scatterchart/scatterchartitem_p.h 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/scatterchart/scatterchartitem_p.h 2023-09-24 13:38:45.000000000 +0200 @@ -45,6 +45,7 @@ void markerPressed(QGraphicsItem *item); void markerReleased(QGraphicsItem *item); void markerDoubleClicked(QGraphicsItem *item); + void handleMarkerMouseReleaseEvent(QGraphicsItem *item); void setMousePressed(bool pressed = true) {m_mousePressed = pressed;} bool mousePressed() {return m_mousePressed;} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/xychart/glxyseriesdata_p.h new/qtcharts-everywhere-src-6.5.3/src/charts/xychart/glxyseriesdata_p.h --- old/qtcharts-everywhere-src-6.5.2/src/charts/xychart/glxyseriesdata_p.h 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/xychart/glxyseriesdata_p.h 2023-09-24 13:38:45.000000000 +0200 @@ -70,7 +70,7 @@ bool mapDirty() const { return m_mapDirty; } void clearAllDirty() { m_mapDirty = false; - foreach (GLXYSeriesData *data, m_seriesDataMap.values()) + for (GLXYSeriesData *data : m_seriesDataMap) data->dirty = false; } void handleAxisReverseChanged(const QList<QAbstractSeries *> &seriesList); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/xychart/qxyseries.cpp new/qtcharts-everywhere-src-6.5.3/src/charts/xychart/qxyseries.cpp --- old/qtcharts-everywhere-src-6.5.2/src/charts/xychart/qxyseries.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/xychart/qxyseries.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -850,24 +850,8 @@ const QVariant &value) { Q_D(QXYSeries); - QHash<QXYSeries::PointConfiguration, QVariant> conf; - if (d->m_pointsConfiguration.contains(index)) - conf = d->m_pointsConfiguration[index]; - - bool callSignal = false; - if (conf.contains(key)) { - if (conf[key] != value) - callSignal = true; - } else { - callSignal = true; - } - - conf[key] = value; - d->m_pointsConfiguration[index] = conf; - - if (callSignal) { + if (d->setPointConfiguration(index, key, value)) emit pointsConfigurationChanged(d->m_pointsConfiguration); - } } /*! @@ -939,6 +923,7 @@ const qreal range = max - min; const qreal sizeRange = maxSize - minSize; + bool changed = false; for (int i = 0; i < sourceData.size() && i < d->m_points.size(); ++i) { qreal pointSize = minSize; @@ -947,8 +932,12 @@ const qreal percentage = startValue / range; pointSize = minSize + (percentage * sizeRange); } - setPointConfiguration(i, QXYSeries::PointConfiguration::Size, pointSize); + if (d->setPointConfiguration(i, QXYSeries::PointConfiguration::Size, pointSize)) + changed = true; } + + if (changed) + emit pointsConfigurationChanged(d->m_pointsConfiguration); } /*! @@ -1019,12 +1008,18 @@ const qreal diff = min < 0 ? qAbs(min) : 0; min += diff; + bool changed = false; + for (int i = 0; i < sourceData.size() && i < d->m_points.size(); ++i) { const qreal startValue = qMax(0.0, sourceData.at(i) + diff - min); const qreal percentage = startValue / range; QColor color = image.pixelColor(0, qMin(percentage * imgSize, imgSize - 1)); - setPointConfiguration(i, QXYSeries::PointConfiguration::Color, color); + if (d->setPointConfiguration(i, QXYSeries::PointConfiguration::Color, color)) + changed = true; } + + if (changed) + emit pointsConfigurationChanged(d->m_pointsConfiguration); } /*! @@ -2012,6 +2007,28 @@ return m_colorByData; } +bool QXYSeriesPrivate::setPointConfiguration(const int index, + const QXYSeries::PointConfiguration key, + const QVariant &value) +{ + QHash<QXYSeries::PointConfiguration, QVariant> conf; + if (m_pointsConfiguration.contains(index)) + conf = m_pointsConfiguration[index]; + + bool changed = false; + if (conf.contains(key)) { + if (conf[key] != value) + changed = true; + } else { + changed = true; + } + + conf[key] = value; + m_pointsConfiguration[index] = conf; + + return changed; +} + QT_END_NAMESPACE #include "moc_qxyseries.cpp" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/charts/xychart/qxyseries_p.h new/qtcharts-everywhere-src-6.5.3/src/charts/xychart/qxyseries_p.h --- old/qtcharts-everywhere-src-6.5.2/src/charts/xychart/qxyseries_p.h 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/charts/xychart/qxyseries_p.h 2023-09-24 13:38:45.000000000 +0200 @@ -14,6 +14,7 @@ #define QXYSERIES_P_H #include <private/qabstractseries_p.h> +#include <private/qxyseries_p.h> #include <QtCharts/private/qchartglobal_p.h> #include <QtCore/qvariant.h> #include <QtCore/qhash.h> @@ -24,7 +25,6 @@ QT_BEGIN_NAMESPACE -class QXYSeries; class QAbstractAxis; class Q_CHARTS_PRIVATE_EXPORT QXYSeriesPrivate: public QAbstractSeriesPrivate @@ -61,6 +61,10 @@ QList<qreal> colorByData() const; + bool setPointConfiguration(const int index, const QXYSeries::PointConfiguration key, + const QVariant &value); + + Q_SIGNALS: void seriesUpdated(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/src/chartsqml2/declarativechart.cpp new/qtcharts-everywhere-src-6.5.3/src/chartsqml2/declarativechart.cpp --- old/qtcharts-everywhere-src-6.5.2/src/chartsqml2/declarativechart.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/src/chartsqml2/declarativechart.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -61,12 +61,10 @@ The ChartView type displays different series types as charts. - \image examples_qmlpiechart.png + This example shows how to create a simple line chart: - The following QML code shows how to create a simple chart with one pie - series: - \snippet qmlpiechart/qml/qmlpiechart/main.qml 1 - \snippet qmlpiechart/qml/qmlpiechart/main.qml 2 + \image examples_qmlchart2.png + \snippet qmlchartsgallery/qml/LineSeries.qml 1 */ /*! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtcharts-everywhere-src-6.5.2/tests/manual/chartwidgettest/mainwidget.cpp new/qtcharts-everywhere-src-6.5.3/tests/manual/chartwidgettest/mainwidget.cpp --- old/qtcharts-everywhere-src-6.5.2/tests/manual/chartwidgettest/mainwidget.cpp 2023-07-07 18:22:19.000000000 +0200 +++ new/qtcharts-everywhere-src-6.5.3/tests/manual/chartwidgettest/mainwidget.cpp 2023-09-24 13:38:45.000000000 +0200 @@ -271,25 +271,22 @@ } else if (seriesName == "Bar" || seriesName == "Stacked bar" || seriesName == "Percent bar") { - QStringList category; QStringList labels = generateLabels(rowCount); - foreach (QString label, labels) - category << label; QAbstractBarSeries* series = 0; if (seriesName == "Bar") { series = new QBarSeries(this); QBarCategoryAxis* axis = new QBarCategoryAxis(); - axis->append(category); + axis->append(labels); m_chart->setAxisX(axis,series); } else if (seriesName == "Stacked bar") { series = new QStackedBarSeries(this); QBarCategoryAxis* axis = new QBarCategoryAxis(); - axis->append(category); + axis->append(labels); m_chart->setAxisX(axis,series); } else { series = new QPercentBarSeries(this); QBarCategoryAxis* axis = new QBarCategoryAxis(); - axis->append(category); + axis->append(labels); m_chart->setAxisX(axis,series); }