main.cpp
资源名称:timer_scr.rar [点击查看]
上传用户:karlzgj
上传日期:2020-03-01
资源大小:68k
文件大小:1k
源码类别:
TAPI编程
开发平台:
QT
- #include "timer.h" #include "myapplication.h"
- #include <ZApplication.h>
- Timer* timer;
- MyApplication* a;
- int main( int argc, char **argv )
- {
- // ZApplication* a = new ZApplication( argc, argv ); a = new MyApplication(argc,argv); int ret; if ( QCopChannel::isRegistered("myapplication/timer/") )
- {
- QCopChannel::send( "myapplication/timer/", "return()" );
- ret = 0;
- } else {
- timer = new Timer(NULL, NULL);
- timer->setGeometry(0,0,240,320);
- a->setMainWidget(timer);
- //timer->show();
- ret = a->exec();
- delete timer; }
- delete a;
- return ret;
- }