Questions tagged [qopenglwidget]
44 questions
5
votes
1 answer
What is the performance difference between QOpenGLWindow and QOpenGLWidget?
I have been looking into the two classes QOpenGLWindow and QOpenGLWidget. And in the documentation of QOpenGLWindow it states: "Unlike QOpenGLWidget, QOpenGLWindow has no dependency on the widgets module and offers better performance." In my current…

Sailanarmo
- 1,139
- 15
- 41
3
votes
0 answers
Is it possible to have a transparent QMainWindow and QOpenGLWidget with an opaque child toolbar?
I would like to have an opaque QWidget in a transparent QMainWindow. The QMainWindow's centralWidget contains a QWidget and a QOpenGLWidget in a vertical layout. The QOpenGLWidget is drawing correctly with rendered objects being opaque and the…

TheShiftingInt
- 71
- 5
3
votes
1 answer
Qt Button Group over OpenGLWidget
I am designing a user interface with Qt Creator. I have a openGLwidget which covers all the form and I want to place some buttons aligned to bottom and some kind of notification frames over the widget. Is there any default way to do that?
When I try…

meakcey
- 83
- 1
- 10
2
votes
1 answer
Objects are transparent when using QPainter
So I've tried to put labels on my objects. I tried out a test example to just put one simple label there. When I ran the program, however, all the objects were somewhat transparent.
paintGL:
void mainWidget::paintGL(){
QPainter painter(this);
…

new Q Open Wid
- 2,225
- 2
- 18
- 34
2
votes
1 answer
How to render some vertices in a buffer as points and the rest using lines in qopenglwidget?
I have a set of vertices and normals stored in a buffer. I want to display most of the vertices as points but i want draw lines for the remaining few vertices. These are all stored inside one vector with the points part in the front and i know the…

anirudh puligandla
- 57
- 6
1
vote
0 answers
Alleviating input latency for implementation of QOpenGLWidget
I am implementing a custom QOpenGLWidget in Qt6 and have overridden paintGL() and mouseMoveEvent() to render a triangle that follows the movement of the mouse.
However, I notice that the triangle is always lagging a frame or more "behind" the…

Mr. Developerdude
- 9,118
- 10
- 57
- 95
1
vote
1 answer
My QOpenGLWidget only produce a black screen
I'm trying to make a QOpenGlWidget of the qt part of this library (https://github.com/melowntech/vts-browser-cpp) and i'm currently with a black screen widget while all functions seems to be running fine.
my widget cpp
#include…

biscuitvanille
- 21
- 3
1
vote
0 answers
Couldn't render OpenGLES context in Qt
I am trying to use OpenGLES in a desktop platform. I have a class whose name is GraphicsViewer which is derived from QOpenGLWidget. When I set the QSurfaceFormat::renderableType to QSurfaceFormat::OpenGLES, I get the following errors and nothing is…

iammetehan
- 11
- 3
1
vote
2 answers
Draw GL_LINE in QOpenGLWidget using array of coordinates
I have working application done using QtCreator. My render class is
GLRendWindow::GLRendWindow(QWidget *parent): QOpenGLWidget(parent)
Now I would like to draw objects using arrays with coordinates of vertices.
I found some tutorial that draws…

rainbow
- 1,161
- 3
- 14
- 29
1
vote
1 answer
Get openGLwidget linked with Qtimer update
I m trying to build a gui with Pyqt5. and withing the gui there is an openGLwidget, that should contain a rotating cube. But i cannot figure out how to make the cube rotate.
Thank you.
this is the setup function
def setupUI(self):
…

Nadsah
- 109
- 1
- 9
1
vote
0 answers
How to reduce the lag in OpenGl?
I wrote a little application, which replaces the cursor with a hand drawn cursor. Therefor i used a QOpenGlWidget.
For the animation i use the frameSwapped signal:
connect(this, SIGNAL(frameSwapped()), this, SLOT(update()));
Till now i don't use…

moritz
- 345
- 2
- 12
1
vote
0 answers
How to add QOpenGLWidget to QGraphicsScene?
My main.cpp
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
format.setVersion(3, 2);
…

Syaiful Nizam Yahya
- 4,196
- 11
- 51
- 71
1
vote
0 answers
QOpenGL error : "Invalid VAO/VBO/pointer usage" "Array object is not active"
I'm currently trying to render a skybox using the QOpenGL library of Qt. For that, I tried to modify the QOpenGL "cube" example that is provided by Qt (I'm using the latest Qt 5.13 version).
The vertex and index buffers are initialized in a class…

JervisCrane
- 21
- 1
1
vote
1 answer
Text dissapears on QOpenGLWidget after undocking
I'm trying to integrate Qt5 and OpenSceneGraph. I've found this minimal example of embedding.
When I encapsulate the widget, defined in the example, into a QDockWidget and add a simple text label to the example, the text dissapears when I undock the…

user20679
- 442
- 4
- 17
1
vote
1 answer
Qmatrix4x4 translate does not take any effect
I didn't have a lot experience in opengl, so excuse me if the question is silly.
I'm trying to move triangle with the mouseMoveEvent by translating Qmatrix4x4 field in my class glView. When i did not do anything (perspective, translate with matrix)…

TreshUp
- 76
- 8