Figure 1.
Empty Main
Page
; On the next panel, provide a project
name (let’s use demo_1 for this
example), and click Next (not Finish).
; The next panel will set up the class
and filenames. You can change the
name of the class where you place
your code. The bottom list box
labeled UI Type is the most important
field. It determines the type of GUI
you will create. A Widget is a basic
panel with no special functions; a
Qdialog provides simple interaction
with a user, and a QmainWindow is a
panel with menus and other features.
For this example, select
QmainWindow, then click Next.
; This panel allows you to include extra
Qt modules—for example, a network
interface or SQL interface. For this
example, the extra modules aren’t
needed, so just click Finish.
You now should have a GUI project
ready to add visual components. To see
the appropriate files, as shown in Figure
1, expand the project in the Project
Explorer panel to the left and double-click
on demo_1.ui.
The compile and execution of the GUI
you have just created may have a hiccup,
especially the first time you run it. You
should be able to select from the Eclipse
menu File→Save All, Project→Build
All, and then Run→Run. If Run→Run
is grayed-out, try the following: