Freitag, 8. Februar 2008

Developing C++ QT applications using Eclipse

You can easily develop C++ QT applications with Eclipse CDT! There is no need for another plugin.

It is important to define the correct libs in the Eclipse project settings. You can find out the correct g++ command string by using qmake(-qt4).
  1. Create a new C++ project.
  2. Add a source file (e.g. the hello world program from the QT4 tutorial)
  3. Use a shell to navigate to the source folder of your hello world program.
  4. Execute "qmake -project && qmake && make" (or qmake-qt4 if you want to use QT4)
  5. You should see the correct g++ line.
  6. Configure your Eclipse project to use the g++ settings.
My project settings (Kubuntu Gutsy, QT4):




You can now delete the files that were created by qtmake and use Eclipse CDT for developing your QT applications. Have fun!

Keine Kommentare: