File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 5
5
#define LOGO_H
6
6
7
7
#include < qopengl.h>
8
- #include < QList >
8
+ #include < vector >
9
9
#include < QVector3D>
10
10
11
11
class Logo
12
12
{
13
13
public:
14
14
Logo ();
15
- const GLfloat *constData () const { return m_data.constData (); }
15
+ const GLfloat *constData () const { return m_data.data (); }
16
16
int count () const { return m_count; }
17
17
int vertexCount () const { return m_count / 6 ; }
18
18
@@ -21,7 +21,7 @@ class Logo
21
21
void extrude (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
22
22
void add (const QVector3D &v, const QVector3D &n);
23
23
24
- QList <GLfloat> m_data;
24
+ std::vector <GLfloat> m_data;
25
25
int m_count = 0 ;
26
26
};
27
27
Original file line number Diff line number Diff line change 13
13
int main (int argc, char * argv[])
14
14
{
15
15
// https://doc.qt.io/qt-6/qtdatavisualization-known-issues.html
16
- // Use either `qputenv("QSG_RHI_BACKEND", "opengl" );` or the following line
17
- QQuickWindow::setGraphicsApi (QSGRendererInterface::OpenGL );
16
+ // Use either `QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL );` or the following line
17
+ qputenv ( " QSG_RHI_BACKEND " , " opengl " );
18
18
19
19
// Disable warnings when attempts are made to convert non-convertible non-native widgets
20
20
// to native widgets (such as QQuickWidget)
You can’t perform that action at this time.
0 commit comments