bitcoin/gui/src/bitcoin.cpp

41 lines
805 B
C++
Raw Normal View History

2011-05-07 13:13:39 -07:00
/*
* W.J. van der Laan 2011
*/
2011-05-12 05:49:42 -07:00
#include "bitcoingui.h"
#include "clientmodel.h"
2011-05-22 05:54:13 -07:00
#include "util.h"
#include "init.h"
2011-05-07 13:13:39 -07:00
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
try {
if(AppInit2(argc, argv))
{
ClientModel model;
BitcoinGUI window;
window.setModel(&model);
2011-05-22 05:54:13 -07:00
window.show();
2011-05-07 13:13:39 -07:00
/* Depending on settings: QApplication::setQuitOnLastWindowClosed(false); */
int retval = app.exec();
2011-05-07 13:13:39 -07:00
Shutdown(NULL);
2011-05-12 11:16:42 -07:00
return retval;
}
else
{
return 1;
}
} catch (std::exception& e) {
PrintException(&e, "Runaway exception");
} catch (...) {
PrintException(NULL, "Runaway exception");
}
2011-05-07 13:13:39 -07:00
}