Specifications

SHARP CORPORATION
Sharp SL-series Zaurus “Qtopia” Development Start-up Guide
Ver 1.11, February 28, 2003, 35/63
tut1.cpp (saved in UTF8 code)
#include <qpe/qpeapplication.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include "tut1.h"
void myMainWindow::changeLabelSlot()
{
mylabel->setText( QString::fromUtf8(" "));
}
myMainWindow::myMainWindow()
{
setGeometry( 0, 0, 240, 320 );
mylabel = new QLabel(this, "Hello Zaurus World" );
mylabel -> setGeometry( 50, 80, 160, 30 );
mybutton = new QPushButton( this, "button" );
mybutton -> setGeometry( 70, 140, 100, 30 );
mybutton -> setText( QString::fromUtf8(" ") );
quitbutton = new QPushButton(this, "quit" );
quitbutton -> setGeometry( 180, 5, 50, 30 );
connect( quitbutton, SIGNAL( clicked()), qApp, SLOT( quit()) );
connect( mybutton, SIGNAL( clicked()), this,
SLOT( changeLabelSlot()) );
}
int main( int argc, char** argv )
{
QPEApplication myapp( argc, argv );
myMainWindow mywidget;
myapp.setMainWidget( &mywidget );
mywidget.show();
return myapp.exec();
}