blob: 6c2ff22318869726dccd16fb2a5560b9e77a32c0 [file] [log] [blame]
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -07001#include<QApplication>
2#include "chatdialog.h"
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -07003#include <QMessageBox>
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -07004
Alexander Afanasyevb4b92292013-07-09 13:54:59 -07005int main(int argc, char *argv[])
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -07006{
Alexander Afanasyevb4b92292013-07-09 13:54:59 -07007 // Q_INIT_RESOURCE(demo);
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -07008 QApplication app(argc, argv);
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -07009
10 if (!QSystemTrayIcon::isSystemTrayAvailable()) {
11 QMessageBox::critical(0, QObject::tr("Systray"),
12 QObject::tr("I couldn't detect any system tray "
13 "on this system."));
14 return 1;
15 }
Alexander Afanasyevb4b92292013-07-09 13:54:59 -070016 QApplication::setQuitOnLastWindowClosed (false);
17
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -070018#ifdef __APPLE__
19 app.setWindowIcon(QIcon(":/demo.icns"));
20#else
21 app.setWindowIcon(QIcon(":/images/icon_large.png"));
22#endif
23
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070024 ChatDialog dialog;
Alexander Afanasyevb4b92292013-07-09 13:54:59 -070025
26 dialog.show ();
27 dialog.activateWindow ();
28 dialog.raise ();
29
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070030 return app.exec();
31}