Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Subclassing QXYSeries in QtCharts
Forum Update on Monday, May 27th 2025

Subclassing QXYSeries in QtCharts

Scheduled Pinned Locked Moved Solved General and Desktop
qtchartssubclassing
3 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    midnite
    wrote on last edited by
    #1

    Hello all,

    I'm using the git version of QtCharts for a personal use / private project which I don't plan to redistribute in any way (doesn't make sense).

    I need to make a chart that is more or less a QLineSeries but with some modifications. So I decided to subclass QXYSeries, like QLineSeries.

    What is the best way to do this? I see QLineSeries uses private headers of QXYSeries, so it doesn't seem to be possible to do the same at user level.

    Am I right?

    So, am I obliged to put my code in the QtCharts source tree and qmake/make/install it like a QtCharts regular class?

    Another question: As I don't plan to distribute my project, can I still use QtCharts with the current license? I've seen that QtCharts will be part of the Qt distribution for the 5.7 release (IIRC).

    FYI: I'm willing to redistribute the « custom chart » part of my project, as it is not private and may benefits other users.

    Thanks,
    Mid'.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You can make use of the private headers using QT += charts-private however if you plan to submit your custom class for inclusion you should work directly in the module.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        midnite
        wrote on last edited by
        #3

        Hello,

        Thanks you for the answer.

        Mid'.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved