lab1.h:
#include "ui_lab1.h"
class lab1: public QWidget {
Q_OBJECT
private:
Ui::lab1Class ui;
protected:
virtual void paintEvent(QPaintEvent* pe) {
}
public:
lab1(QWidget *parent = 0);
~lab1();
void drawgraph();
};
lab1.cpp
#include "lab1.h"
lab1::lab1(QWidget *parent) : QWidget(parent) {
ui.setupUi(this);
}
lab1::~lab1() {
}
void paintEvent(QPaintEvent* pe) {
QPainter painter1; //Тут ошибка
....
}
Компилятор пишет:
Цитата
lab1.cpp:13: error: aggregate `QPainter painter1' has incomplete type and cannot be defined
Не понимаю что не нравиться... лаба стоит