Skip to content

Commit 6400036

Browse files
committed
Fix the CI with Qt5
1 parent be8520f commit 6400036

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/openGL/logo.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
#define LOGO_H
66

77
#include <qopengl.h>
8-
#include <QList>
8+
#include <vector>
99
#include <QVector3D>
1010

1111
class Logo
1212
{
1313
public:
1414
Logo();
15-
const GLfloat *constData() const { return m_data.constData(); }
15+
const GLfloat *constData() const { return m_data.data(); }
1616
int count() const { return m_count; }
1717
int vertexCount() const { return m_count / 6; }
1818

@@ -21,7 +21,7 @@ class Logo
2121
void extrude(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
2222
void add(const QVector3D &v, const QVector3D &n);
2323

24-
QList<GLfloat> m_data;
24+
std::vector<GLfloat> m_data;
2525
int m_count = 0;
2626
};
2727

examples/openGL/main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
int main(int argc, char* argv[])
1414
{
1515
// 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");
1818

1919
// Disable warnings when attempts are made to convert non-convertible non-native widgets
2020
// to native widgets (such as QQuickWidget)

0 commit comments

Comments
 (0)