예제 #1
0
파일: main.cpp 프로젝트: LeungGeorge/Helper
int main(){

    StopWatch s;
    s.start();
    int tms = 1;
    std::cout << "st: " << s.seconds() << std::endl;

    try
    {
        MyClass m;
        m.show();
        m.fun();
        m.show();
        m.fun();
        m.show();
        m.fun();
    }
    catch(const std::exception &e)
    {
        std::cout << e.what() << std::endl;
    }


    std::cout << "et: " << s.seconds() << std::endl;

    system("pause");
    return 0;
}
예제 #2
0
int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
	MyClass w;
	w.show();
	return a.exec();
}
int main(int argc, char **argv)
{
     QApplication app(argc, argv);

     MyClass cl;
     cl.show();
     QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));

     int ret = app.exec();
     return ret;
}