QT Creator + Other IDEs

Started by
0 comments, last by BitMaster 10 years ago

I'm developing a model viewer that'll rely on my own OpenGL-based game engine to do the processing and rendering. I was able to get an OpenGL view working in my QT application just fine, but I'm having issues getting the game engine to hook into it.

My build tree in QT Creator consists of two projects:

-Engine

-Model Viewer

The engine is built as a shared object (I'm using Debian), and everything compiles fine. The Model Viewer project references my Engine project going the External Library route because I couldn't get my built library to appear in the Internal Library's drop-down. I included by engine's header, and was able to make a call to my game engine's static Engine::Start() method. It compiles, but my Model Viewer application crashes before the window even draws. It doesn't give me anymore information, so I'm not sure what exactly's going on... Does anyone have any ideas on how to debug this? I'm kind of new to debugging in QT Creator.

EDIT: I figured out the crash: I forgot to initialize GLEW before making gl* calls. My question below still remains, however ;)

On a side now, I am comfortable with CodeBlocks, and a lot of my projects using my engine uses that. Is there a way to build my QT-based UI in its Interface Designer, save it out as a .ui file, then get it to load using the QT SDK in CodeBlocks? The way I understand it is even though QT is a C++ SDK, it uses its own compiler to compile code as it has extra keywords such as "signal", "slot", etc.

Advertisement

On a side now, I am comfortable with CodeBlocks, and a lot of my projects using my engine uses that. Is there a way to build my QT-based UI in its Interface Designer, save it out as a .ui file, then get it to load using the QT SDK in CodeBlocks? The way I understand it is even though QT is a C++ SDK, it uses its own compiler to compile code as it has extra keywords such as "signal", "slot", etc.


There should be no problem using Qt from Code::Blocks. The extra keywords are simply macros defined by the Qt headers. The only entity which needs to extract information using those extra keywords is the meta object compiler (a kind of preprocessor which adds some extra information). That's simply an executable which is run on the header and creates an additional implementation file.
You can of course call that manually on the required files but you should be able to automatize it using build rules (can't help you there with Code::Blocks but it worked fine in MSVC). Nowadays I use CMake (integrates perfectly with QtCreator) for my projects and setting CMAKE_AUTOMOC to TRUE removes all my need to deal with it, regardless of build system I intend to use.

Also note the library is just called 'Qt', not 'QT'.

This topic is closed to new replies.

Advertisement