Qt install OpenGL support in ubuntu

Asked by Raj Gaurav

Dear All,

I am newb in Qt. I am having some problem with using openGL in Qt 4. When I try to include <QtOpenGL> or <QGLWidget> , it does not support.

I have added a paramter
QT += opengl in my .pro file. But then also my problem not solved.

I have tested OpenGL in my system with this command :
 glxinfo | grep direct
It answered :
direct rendering: Yes

So I assume OpenGL is enabled in my system, but why Qt is not able to include it. I checked "include" directory. 'QtOpenGL' is not there. Even I reinstalled Qt, but same.

So, kindly tell me how to resolve this.

Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu qt4-x11 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Are there any bugs reported?

Revision history for this message
Raj Gaurav (rajgaurav-jsr) said :
#2

When I Run the code, the following error message comes:

QtOpenGL : no such file or directory.
QGlWidget : no such file or directory.

Revision history for this message
samuel (samuel-h) said :
#3

Have you checked you have the correct qt librarys installed, I've never used qt myself, but no such file or directory seems like it's not finding the file with that function/widget in. Meaning that you don't have a library. I suggest googling around to see if theres any librarys that need to be installed before you can use OpenGL in qt.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#4

please install/reinstall from terminal:

sudo apt-get --reinstall install libqt4-opengl-dev

Revision history for this message
gnc (gnc30) said :
#5

Meaning that you don't have a library. I suggest googling around to see if theres any librarys that need to be installed before you can use OpenGL in qt. https://xender.pro/ https://discord.software/ https://omegle.onl/

Can you help with this problem?

Provide an answer of your own, or ask Raj Gaurav for more information if necessary.

To post a message you must log in.