qt - How to make QtCreator recognize autocompletion for OpenGL functions when building with CMake? -


I am starting to work with QT + OpenGL for my app. I have also found that to create an application to use the SIMKA

However, I can not get QT to recognize OpenGL functions for autocompletion. The app prepares properly and moves without problems.

Would anyone add me to CMK file or get a setting in QT to get autocomplete?

If necessary, here is my CMakeLists.txt

  CMAKE_MINIMUM_REQUIRED (version 2.8) Project (QtOpenGLTemplate) FIND_PACKAGE (Qt5Widgets required) IF (Qt5Widgets_FOUND) Message (position "Qt5 widget modules Found! ") ELSE () message (warning" Qt5 Widgets module not Idiaiaf () Faiaidiaf () FIND_PACKAGE (Qt5OpenGL required) IF (Qt5OpenGL_FOUND) message (position "Qt5 OpenGL module Found!") () message (warning "Qt5 OpenGL module was not found! ") ENDIF () FIND_PACKAGE (OpenGL required) IF (OPENGL_FOUND) Message (Status" OpenGL Found! ") Message (s) Tavni "Open not found!") Idiaif () set (Source Men CPP Glovier CPP) ADD_EXECUTABLE (QtOpenGLTemplate $ {SOURCES}) TARGET_LINK_LIBRARIES (QtOpenGLTemplate $ {OPENGL_LIBRARIES} Qt 5 :: widget Qt5 :: OpenGL)   

I got answers

successful find_package, Qt 5 Should be found below CMAKE_PREFIX_PATH, or the QT5 DIIR should be set in the CMK cache instead of the QT5 Witets config comack file.

Add the following line in CMakeLists.txt

 Simkeke The easiest way to use it to set CMAKE_PREFIX_PATH environment variable.  SET (CMAKE_PREFIX_PATH "$ {CMAKE_PREFIX_PATH} / Applications of / qt / 5.3 / Claint_64")  

made QT to identify the Opanjiel functions and auto-complete.


Comments