Difference between revisions of "Importing EMAC OE SDK QT Projects with Eclipse"

From wiki.emacinc.com
Jump to: navigation, search
(Created page with "{{todo|Inprogress; (12.31.13-18:15->MG+)|Michael Gloff|project=oe 4,mg,ky,md,InProgress}} == EMAC SDK with Qt Example: Compile and Run the <code>textedit</code> Project == ==...")
 
(Added intro)
Line 1: Line 1:
{{todo|Inprogress; (12.31.13-18:15->MG+)|Michael Gloff|project=oe 4,mg,ky,md,InProgress}}
+
{{todo|Review;(12.31.13-18:15->MG+);(1.2.14-17:25->MG+)|Michael Gloff|project=oe 4,mg,ky,md,Review}}
 +
 
 +
Qt C++ projects can be built and run with Eclipse through the pre-installed Qt plugin provided with [ftp://ftp.emacinc.com/Controllers/Development_Kits/EMAC_Open_Tools/Linux/eclipse-3.6-Linux-EMAC_Qt.tar.bz2 Eclipse] from EMAC. Note that the project will only run on EMAC products that contain the appropriate Qt libraries.
  
 
== EMAC SDK with Qt Example: Compile and Run the <code>textedit</code> Project ==
 
== EMAC SDK with Qt Example: Compile and Run the <code>textedit</code> Project ==
 +
 
=== Importing the Project ===
 
=== Importing the Project ===
  
 
This procedure provides an overview of how to compile and run Qt C++ applications in Eclipse.  
 
This procedure provides an overview of how to compile and run Qt C++ applications in Eclipse.  
 
<cl>
 
<cl>
1. Click ''Window → Open Perspective → Other...'' To bring up a dialog window with a list of Perspectives to choose from.
+
1. Start Eclipse and select a workspace such as /home/developer/workspace.
 +
* Click ''Window → Open Perspective → Other...'' To bring up a dialog window with a list of Perspectives to choose from.
 
* Choose ''Qt C++'' and click ''Ok''.
 
* Choose ''Qt C++'' and click ''Ok''.
* Select ''File→Import...''
+
* Select ''File → Import...''
 
* Expand Qt and select Qt Project
 
* Expand Qt and select Qt Project
  

Revision as of 18:23, 2 January 2014

TODO: {{#todo:Review;(12.31.13-18:15->MG+);(1.2.14-17:25->MG+)|Michael Gloff|oe 4,mg,ky,md,Review}}

Qt C++ projects can be built and run with Eclipse through the pre-installed Qt plugin provided with Eclipse from EMAC. Note that the project will only run on EMAC products that contain the appropriate Qt libraries.

EMAC SDK with Qt Example: Compile and Run the textedit Project

Importing the Project

This procedure provides an overview of how to compile and run Qt C++ applications in Eclipse.

  1. Start Eclipse and select a workspace such as /home/developer/workspace.

  2. Click Window → Open Perspective → Other... To bring up a dialog window with a list of Perspectives to choose from.

  3. Choose Qt C++ and click Ok.

  4. Select File → Import...

  5. Expand Qt and select Qt Project

    Eclipse import project step1.png


  6. Click Next >, then click Browse...

  7. Navigate to the projects/qt_demos/textedit directory underneath the install location of the EMAC OE SDK.

  8. Highlight textedit.pro then click OK.

  9. Click Finish.

    Eclipse import project step2.png


Building the Project

The Project Explorer should now show the textedit project.

Eclipse textedit project selected.png


The arrowhead to the left of textedit indicates that the textedit project is open.

  1. Click on the arrowhead to see the files in the project.

  2. Double click on the textedit.cpp file to open it. The arrow next to textedit.cpp can be expanded to see a list of classes and functions available within this source file.

  3. To build the project, ensure the project is highlighted in the Project Explorer treeview in the left pane.

  4. Select Project→Run qmake

  5. Now, select Project→Build Project. The project will now build, and your window should appear similar to the screenshot below:

    Eclipse qt build textedit finished.png


    If there are any build errors they will be shown in the Console and/or Problems tabs on the bottom.