My favorites | Sign in
Project Home Downloads Wiki Issues Source
How-to get the code and setup an development environment for SWT/Qt
Featured, Phase-Implementation
Updated Nov 30, 2010 by

Getting the code

Eclipse Labs uses Mercurial as source code management (SCM) tool. If you do not have a client, please visit their download section.

Their is also an Eclipse plugin, MercurialEclipse.

To checkout the code please execute the following command in your favorite shell:

hg clone swtqt 

After the checkout you end up with a "swtqt" directory containing the following three projects:

  1. org.eclipselabs.swtqt - this contains the SWT/Qt source code
  2. org.eclipselabs.swtqt.bundles - the required the Qt Jambi Java and native bundles for Windows, Linux and Mac OS X
  3. org.eclipselabs.swtqt.advancedstyler - this contains the Eclipse plugin for easy styling of your application

Setting it up

Import the three projects to Eclipse via File -> Import... -> Existing Projects into Workspace. Select the location where you checked out the projects.

The org.eclipselabs.swtqt contains three .classpath files, one for each of the supported operating systems.

  1. .classpath_qt_linux64
  2. .classpath_qt_osx
  3. .classpath_qt_win32

Copy the one for your OS and save it as ".classpath". Rebuild the project.

SWT/Qt needs the Qt Jambi bundles. To make them known, you have to add them to your target platform:

  1. go to Window -> Preferences -> Plugin Development -> Target Platform
  2. click "Add..."
  3. select "Default..."
  4. click "Next"
  5. click "Add..."
  6. select "Directory"
  7. click "Next"
  8. enter the location of the "swtqt" directory, you checked out
  9. click "Finish"
  10. go to the "Content" tab
  11. make sure no org.eclipse.swt* bundles are selected
  12. select "qtjambi-4.5.2_01_osgipatch"
  13. select only one of the qtjambi bundles for your platform (win32, linux64, etc.)
  14. click "Finish"
  15. select your new Target Platform
  16. click "OK" and eclipse will rebuild your workspace

You should not have any compile errors.

Sign in to add a comment
Powered by Google Project Hosting