main.cpp Example File
messageviewer/main.cpp
#include "messageviewer.h"
#include <qtopiaapplication.h>
#define USE_THE_MAIN_MACROS
#ifdef USE_THE_MAIN_MACROS
QTOPIA_ADD_APPLICATION(QTOPIA_TARGET, MessageViewer)
QTOPIA_MAIN
#else
#ifdef SINGLE_EXEC
QTOPIA_ADD_APPLICATION(QTOPIA_TARGET, exampleapp)
#define MAIN_FUNC main_exampleapp
#else
#define MAIN_FUNC main
#endif
!
QSXE_APP_KEY
int MAIN_FUNC( int argc, char **argv )
{
QSXE_SET_APP_KEY(argv[0]);
QtopiaApplication a( argc, argv );
QTOPIA_SET_DOCUMENT_SYSTEM_CONNECTION();
MessageViewer *mw = new MessageViewer();
a.setMainWidget(mw);
if ( mw->metaObject()->indexOfSlot("setDocument(QString)") != -1 ) {
a.showMainDocumentWidget();
} else {
a.showMainWidget();
}
int rv = a.exec();
delete mw;
return rv;
}
#endif
Copyright © 2009 Trolltech |
Trademarks |
Qt Extended 4.4.3 |