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. QChartView - 'is private within the contect'

QChartView - 'is private within the contect'

Scheduled Pinned Locked Moved Unsolved General and Desktop
privateqt5.11qchartview
3 Posts 2 Posters 933 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.
  • B Offline
    B Offline
    bandito
    wrote on 23 Nov 2018, 19:26 last edited by bandito
    #1

    The following error just recently happen with one header file of my program. If always compiled fine before that.

    QChartView /home/programming/chartview.h:9: error: ‘QtCharts::QChartView::QChartView(const QtCharts::QChartView&)’ is private within this context
    

    Can't find the solution. Does anyone know how to address this?

    helper.h
    
    #ifndef CHARTVIEW_H
    #define CHARTVIEW_H
    
    #include <QtCharts/QChartView>
    #include <QtWidgets>
    #include <QtCharts>
    
    class ChartView : public QChartView{
    
    public:
        ChartView(QChart *chart, QWidget *parent = 0);
        QLineSeries *hLine;
        QLineSeries *vLine;
        bool isDoneDrawing;
        void doneDrawing(bool newValue);
    
    protected:
        void mouseMoveEvent(QMouseEvent *event);
    
    };
    #endif
    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 23 Nov 2018, 20:19 last edited by
      #2

      Please post the whole error message and not only the last line. You're trying to copy a ChartView object somewhere in your code which is not allowed.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      3
      • B Offline
        B Offline
        bandito
        wrote on 23 Nov 2018, 23:44 last edited by
        #3

        That was to whole error. As for code I have too much to post.

        Anyhow I fixed it by creating a new header file, copying the contents from the original header file into the new one, deleting the original and renaming the new header file to the name of the original one.

        1 Reply Last reply
        0

        2/3

        23 Nov 2018, 20:19

        • Login

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