Можно ли код из Qt Creator который находиться в примерах запустить на KDevelop ?Код:#include #include "glwidget.h"#include "helper.h"GLWidget::GLWidget(Helper *helper, QWidget *parent) : QGLWidget(QGLFormat(QGL::SampleBuffers), parent), helper(helper){ elapsed = 0; setFixedSize(200, 200); setAutoFillBackground(false);}void GLWidget::animate(){ elapsed = (elapsed + qobject_cast(sender())->interval()) % 1000; repaint();}void GLWidget:
aintEvent(QPaintEvent *event){ QPainter painter; painter.begin(this); painter.setRenderHint(QPainter::Antialia sing); helper->paint(&painter, event, elapsed); painter.end();}Код:#ifndef GLWIDGET_H#define GLWIDGET_H#include class Helper;class QPaintEvent;class QWidget;class GLWidget : public QGLWidget{ Q_OBJECTpublic: GLWidget(Helper *helper, QWidget *parent);public slots: void animate();protected: void paintEvent(QPaintEvent *event);private: Helper *helper; int elapsed;};#endif