Graphics Reference
In-Depth Information
Laying out the application
Let's implement the ForestTrails system one small step at a time. Create a directory to hold
the source code for the ForestTrails system, and then create the data and resources
subdirectories within it. As many of the files in the main directory are straightforward, let's
just go ahead and create the following files:
• The Makefile should look like this:
RESOURCE_FILES = resources.py
default: compile
compile: $(RESOURCE_FILES)
%.py : %.qrc
pyrcc4 -o $@ $<
%.py : %.ui
pyuic4 -o $@ $<
clean:
rm $(RESOURCE_FILES)
rm *.pyc
Tip
Note that if your pyrcc4 command is in a nonstandard location, you might need
to modify this file so that make can find it.
• Create the resources.qrc file as follows:
<RCC>
<qresource>
<file>resources/mActionZoomIn.png</file>
<file>resources/mActionZoomOut.png</file>
<file>resources/mActionPan.png</file>
<file>resources/mActionEdit.svg</file>
<file>resources/mActionAddTrack.svg</file>
Search WWH ::




Custom Search