Specifications
SHARP CORPORATION
Sharp SL-series Zaurus “Qtopia” Development Start-up Guide
Ver 1.11, February 28, 2003, 34/63
Note that the “moc” procedure will automatically be executed when you use Makefile to compile, if you specify the
file in the project file (.pro file). The following is an example of .pro file that automatically does the “moc” procedure.
With this file, one can use “tmake” tool to create Makefile, and do the compile link.
TEMPLATE = app
CONFIG = qt warn_on release
HEADERS = tut1.h
SOURCES = tut1.cpp
INTERFACES =
INCLUDEPATH += $(QPEDIR)/include
DEPENDPATH += $(QPEDIR)/include
TARGET = tut1
LIBS += -lqpe
2.8. Sample application source
As a summary of the above sections, the following is a set of sample application source that includes character
code conversion as well as own SLOT function.
This sample application changes “Hello Zaurus World” label when the “
” labeled button is pressed. It also
terminates the application when the “quit” button is pressed. This sample application consists of tut1.h, tut1.cpp,
and tut1.pro files.
tut1.h
class myMainWindow:public QWidget
{
Q_OBJECT
public:
myMainWindow();
public slots:
void changeLabelSlot();
private:
QLabel *mylabel;
QPushButton *quitbutton;
QPushButton *mybutton;
};