Results 1 to 4 of 4

Thread: Can not use QGLWidget.

  1. #1
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Can not use QGLWidget.

    I installed Qt 4.3.1 as follows:

    ./configure -static -release -no-qt3support -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg -qt-libtiff -nomake demos -nomake examples

    make
    su
    make install

    I can create Qt programs but using QGLWidget gives an error message during compiling. It seems
    that the include files for QtOpenGL are not installed in /usr/local/Trolltech/Qt-4.3.1/include.

    In my opinion this is weird because according to the output of "./configure --help" openGL is installed by default.

    Does anybody know what went wrong here?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Can not use QGLWidget.

    Do you have QT+=opengl to your .pro file?

  3. #3
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    64
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can not use QGLWidget.

    Quote Originally Posted by wysota View Post
    Do you have QT+=opengl to your .pro file?
    Yes, I have.
    But that's not the problem. The problem is that there are no headerfiles in my Qt dir, like Qt was installed with the option "-no-opengl".

    When you decompress the tarbal after downloading Qt from Trolltech, there is a dir /home/teuniz/software/Qt/qt-x11-opensource-src-4.3.1/include/QtOpenGL with all the necesary headerfiles.

    After installing Qt, when I look in the dir /usr/local/Trolltech/Qt-4.3.1/include there are only the subdir's:
    Qt
    QtCore
    QtGui
    QtNetwork
    QtScript
    QtSql
    QtSvg
    QtXml

    My question is: Why does the cmd "make install" copy all the necessary dirs containing the headerfiles except for the dir QtOpenGL?
    I did not use the option "-no-opengl" when configuring Qt.

    Regards.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Can not use QGLWidget.

    When you run configure at some point it reports which parts of the framework will be built (it's a list of features with yes/no/plugin values). Check whether the GL module is there with a "yes". It might be that you're missing OpenGL headers and Qt compilation script detects that and avoids building the module.

Similar Threads

  1. QGLWidget renderText rotation
    By ToddAtWSU in forum Qt Programming
    Replies: 4
    Last Post: 19th September 2007, 20:52
  2. QGLWidget bug
    By Wizard in forum Qt Programming
    Replies: 11
    Last Post: 31st August 2007, 11:23
  3. Transparent widgets on top of QGLWidget
    By tseval in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2007, 21:03
  4. Transparent QWidget on QGLWidget
    By showhand in forum Qt Programming
    Replies: 2
    Last Post: 27th November 2006, 01:00
  5. QGLWidget on another QGLWiget
    By showhand in forum Qt Programming
    Replies: 1
    Last Post: 23rd October 2006, 09:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.