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 inherits
Forum Updated to NodeBB v4.3 + New Features

QChartView inherits

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 281 Views 2 Watching
  • 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.
  • C Offline
    C Offline
    Creatorczyk
    wrote on last edited by
    #1

    Hi,

    I have a problem. I try to make a class that will be a QWidget and will inherit from QChartView. But I gets error during compilation:

    chartview.h:8: error: expected class-name before ‘{’ token

    #ifndef CHARTVIEW_H
    #define CHARTVIEW_H
    
    #include <QChartView>
    
    class ChartView : public QChartView
    {
        Q_OBJECT
    public:
        explicit ChartView(QWidget *parent = nullptr);
    };
    
    #endif // CHARTVIEW_H
    
    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      Do you have QT += charts
      in the .pro file ?

      (remember to clean all, rebuild all if you add it )

      1 Reply Last reply
      2

      • Login

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