hyper-world

Your browser seems not to be supporting CSS 2.0. Therefore most of the design of this website has been deactivated. If you want to download a CSS 2.0 compatible browser, I recommend Mozilla Firefox.

Eclipse: QtHeaders

If you use Qt with Eclipse you will experience that the code completion does not work as expected. The reason is that the Qt header files do not end with the .h extension. Therefore they are not recognized by Eclipse. There is a Qt development plugin for Linux and Windows which probably fixes this problem. However, this plugin is not available for Mac OS X, yet. So I decided to create this simple plugin which can be used also with Mac OS X and which lets Eclipse recognize the Qt header files to get the code completion working.

I also wrote a tutorial how to setup Eclipse under Mac OS X for the development of Qt applications.

Installation:

Copy the plugin to the “plugins” directory of your Eclipse directory and restart Eclipse.

License

The plugin may be redistributed and changed under the GNU Public License.

Downloads:

The version numbers correspond to the Qt version for which the plugin was made.

The sourcecode is also hosted at gitorious.org in a git repository.

Description Version Download Size
Compiled plugin 4.7.2 qtheaders_4.7.2.jar 7,5 KiB
Compiled plugin 4.6.3 qtheaders_4.6.3.jar 7,4 KiB
Sourcecode 4.6.3 qtheaders-4.6.3.tar.gz 25 KiB
Compiled plugin 4.5.1 qtheaders_4.5.1.jar 7,2 KiB
Sourcecode 4.5.1 qtheaders.tar.gz 80 KiB

Last modification: April 12th, 2011 at 19:36

Trackback URL

4 Responses to “Eclipse: QtHeaders”

  1. Zack Says:

    July 22nd, 2010 at 08:25

    Hi,
    thanks a lot for the plugins. I recently updated my Qt installation to version 4.7-64bit and Eclipse to 64-bit version codename Helios. Could you figure out if can be simple to update the plugin to work with this version of Qt and Eclipse? Thanks a lot. Best regards. Zack

  2. blubb Says:

    July 23rd, 2010 at 07:22

    The update to Qt version 4.7 should be easy. The plugin mainly consists of a single (XML) file listing all the Qt headers. One would only have to add the new headers in version 4.7.
    Concerning the Eclipse version I would hope that the plugin does not need any changes. However, I am not sure about this and have to try this for myself. But I am still using Galileo and will not update for the next few weeks.

    Probably I will publish an updated version in a few months. (I suppose I will not have enough free time earlier, but if you are lucky it might also be in the next few weeks.)

  3. Ryan Says:

    August 10th, 2011 at 15:31

    Does this work for developing C++ applications in eclipse with QT? Do I need to do anything else or if I download the .jar file and include it in the plugins directory of Eclipse, I can use the Eclipse libraires in any of my C++ programs?

  4. blubb Says:

    August 11th, 2011 at 18:56

    No, you cannot use the Eclipse libraries with this plugin in C++ programs. All the plugin does are two things. Firstly, it is removing the warning include lines of the Qt header files that these could not be found. Secondly, it allows Eclipse to scan the files for autocompletion tokens. However, the autocompletion does not seems to work as expected with newer Qt versions. Presumably, the Eclipse parser gets confused by the macros used in the Qt headers.

Leave a Reply

Please notice that all fields are optional. If you fill them in you agree that this data will be saved permanent.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2004 - 2009 Jan Gosmann

Imprint and Disclaimer

Entries (RSS) and Comments (RSS)
36 queries. 3.372 seconds.