Jump to content
  • entries
    38
  • comments
    119
  • views
    87,695

Learning Qt


Canardia

3,417 views

 Share

I decided to try out Qt, and was shocked how easy it was to "install" and use.

I only unpacked the mingw-Qt zip to my h:/lib/qt folder and it was "installed".

Then I only added the QtCore4.a and QtGui4.a to my codeblocks project's linker settings, and added the h:/lib/qt/include and h:/lib/qt/include/qtgui folder to my project's source files tab, and then I put the QtCore4.dll and QtGui4.dll in the same folder where my game.exe was.

 

A simple demo program like this already makes a fully functional text editor:

#include <QtGui>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QTextEdit edit;
edit.show();
edit.append("Hello World!\n");
return app.exec();
}

blogentry-2-0-48689300-1316019283_thumb.png

It compiles in less than a second with codeblocks too B)

Now I will learn a bit more how to use Qt, and then make a demo with LE2 using Qt.

I think this will be the ultimate killer GUI, because it's so easy to use and extremely lightweight and fast (it only links what you use).

And it looks like it uses by default the OS style too, what Josh likes.

 Share

5 Comments


Recommended Comments

That's even better then, because then it can use OpenGL drawing to simulate the OS look, which renders much faster than for example Windows XP's native GUI.

Link to comment

While QT can be made to do that, it doesn't do so by default and for good reason. GUI code does not need to draw very quickly. Draw too quickly and you're wasting system resources.

Link to comment

I read there are actually 3 render modes for Qt:

1) Native (default)

2) Raster

3) OpenGL

Then there is also a cool demo called WolfenQt, which kinda blows your brain away what Qt can do :)

Now, I want THAT in LE2, and I got it almost working.

Link to comment

Hmm, I always avoided Qt and didn't even bother to look into it, because I suspected it would be bloated, slow and not a pleasure to work with. Seems I've been wrong on all accounts on this one. But I've settled on using AntTweakBar now,for all my opengl/LE testing and experimentation needs - it works like a charm and doesn't get in my way, also there's no learning curve, installation or integration, you can just start using it right away. But I'll definitely look into Qt the next time I need a full blown GUI system! So please post more of your 'findings' on this one :)

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...