blob: c12375a861fe1d607c503ff33932865d08c0f5b5 [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
5int main(int argc, char *argv[])
6{
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -07007
8 Q_INIT_RESOURCE(demo);
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -07009 QApplication app(argc, argv);
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -070010
11 if (!QSystemTrayIcon::isSystemTrayAvailable()) {
12 QMessageBox::critical(0, QObject::tr("Systray"),
13 QObject::tr("I couldn't detect any system tray "
14 "on this system."));
15 return 1;
16 }
17 QApplication::setQuitOnLastWindowClosed(false);
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070018
Zhenkai Zhu3a008fc2012-06-08 17:36:39 -070019#ifdef __APPLE__
20 app.setWindowIcon(QIcon(":/demo.icns"));
21#else
22 app.setWindowIcon(QIcon(":/images/icon_large.png"));
23#endif
24
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070025 ChatDialog dialog;
26 dialog.show();
Zhenkai Zhu7e9b06d2012-06-02 00:44:42 -070027 dialog.activateWindow();
Zhenkai Zhu6d589aa2012-05-29 17:34:35 -070028 return app.exec();
29}