-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
36 lines (31 loc) · 1.15 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <QtGui/QApplication>
#include <QDesktopWidget>
#include <QSystemTrayIcon>
#include <QMessageBox>
#include <QMainWindow>
#include "sidebarwidget.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QCoreApplication::setOrganizationName("betaworx");
QCoreApplication::setOrganizationDomain("betaworx.de");
QCoreApplication::setApplicationName("QLaunchBar");
if (!QSystemTrayIcon::isSystemTrayAvailable())
{
QMessageBox::critical(0, QObject::tr("Sorry, systray required"),
QObject::tr("We have been unable to detect a systray"
" on this system. QLaunchBar cannot run without"
" one and will now exit."));
return 1;
}
QApplication::setQuitOnLastWindowClosed(false);
const int desktopWidth = QApplication::desktop()->width();
const int desktopHeight = QApplication::desktop()->height();
//QMainWindow window;
//window.setVisible(true);
//window.show();
SidebarWidget w(desktopWidth, desktopHeight);
w.show();
//w.setVisible(true);
return a.exec();
}