Added OpenGL widget

This commit is contained in:
Muaz Ahmad 2023-05-02 13:02:56 +05:00
parent ae68281177
commit 0e80188eaa
3 changed files with 25 additions and 0 deletions

View file

@ -30,9 +30,19 @@
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0">
<widget class="OPGLWidget" name="openGLWidget"/>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
<customwidgets>
<customwidget>
<class>OPGLWidget</class>
<extends>QOpenGLWidget</extends>
<header>opglwidget.h</header>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

8
opglwidget.cpp Normal file
View file

@ -0,0 +1,8 @@
#include "opglwidget.h"
#include <QtGui/QOpenGLFunctions>
//virtual void OPGLWidget::initializeGL() override {}
//virtual void OPGLWidget::paintGL() override {}
//virtual void OPGLWidget::resizeGL(int w, int h) override {}

7
opglwidget.h Normal file
View file

@ -0,0 +1,7 @@
#include <QtWidgets/QOpenGLWidget>
class OPGLWidget : public QOpenGLWidget
{
public:
OPGLWidget(QWidget *parent) : QOpenGLWidget(parent) {}
};