继承QDeclarativeListView的小程序为什么编译不通过呢?
.pro文件:
QT += core gui declarativeTARGET = extendedlistviewTEMPLATE = appSOURCES += main.cpp\ extendedlistview.cppHEADERS += extendedlistview.h
#include <QtDeclarative>#include "private/qdeclarativelistview_p.h"class ExtendedListView : public QDeclarativeListView{ Q_OBJECTpublic: ExtendedListView(QDeclarativeListView *parent = 0); ~ExtendedListView();};
#include "extendedlistview.h"ExtendedListView::ExtendedListView(QDeclarativeListView *parent) : QDeclarativeListView(parent){}ExtendedListView::~ExtendedListView(){}
#include <QtGui/QApplication>#include "extendedlistview.h"int main(int argc, char *argv[]){ QApplication a(argc, argv); ExtendedListView w; w.show(); return a.exec();}