Ubuntu

Qt install OpenGL support in ubuntu

Asked by Raj Gaurav on 2012-07-31

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:
2012-07-31
Last reply:
2012-08-04

Are there any bugs reported?

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.

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.

please install/reinstall from terminal:

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

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.