QT 4 on Code::Blocks 10.5 with QGLWidget Not Solved yet



  • Okay so i have a working ui but i cant figure out how to get opengl working with qt on code::Blocks 10.5 it has something to do with QMake and or Cmake?? but i dont even know where to start any ideas or hints or tutorials that are well thought out and explained in depth or could someone explain it to me

    i have tried some but it ant been succesfull so far :(

    oh and if anyone was wondering why i use Code::Blocks 10.5 over QT awesome software is because i feel it puts me away from the code and more on the designer i like to feel like im the one thats in control :) but i dont think its software is bad or needs to be changed!


  • Moderators

    You may get around qmake and cmake problems by using an IDE such as qt creator, if those tools are really the origin of your problem.



  • very much true :) but i did think okay maybe ill just use the QT creator and i tryed very stumbornly to get my code coming from qt that was written in code::Blocks working with the qt creator but it required more extra setups to work so i wasnt happy with that so im stuck with QMake problems i really dont mind problems its when i cant see any logic or meaning to it that gets me up evil :)

    hopefully someone knows how to work Qmake and get QT and Opengl working with Code::Blocks :D and plus i can learn from them



  • Any ideas? plz


  • Moderators

    The different makes (qmake, cmake, nmake, make, ...) are not my best friends either. So I am of little respectively no help.

    Within this forum you might get the best help when you are using Qt Creator.

    BTW it is Qt. "QT" stands for "Quick Time" in this forum.

    Good luck.



  • lets just hope someone answers :)



  • If you have yourProjectName.pro file so you shold add:
    @contains(QT_CONFIG, opengl): QT += opengl@
    in .h or .cpp add this:
    @
    #ifndef QT_NO_OPENGL
    #include <QGLWidget>
    //and so on
    #endif
    @
    if you use cmake so add this:
    @
    #############################################################

    search for Qt4

    SET(QT_MIN_VERSION 4.4.0)
    FIND_PACKAGE(Qt4 ${QT_MIN_VERSION} REQUIRED)
    SET(QT_USE_QTOPENGL 1)

    INCLUDE( ${QT_USE_FILE} )

    TARGET_LINK_LIBRARIES(yourAppName
    ${QT_LIBRARIES}
    )
    @
    Some thing like this :-)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.