-
Notifications
You must be signed in to change notification settings - Fork 272
/
main.cpp
39 lines (32 loc) · 1.58 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
37
38
39
/*
###############################################################################
# #
# The MIT License #
# #
# Copyright (C) 2017 by Juergen Skrotzky (JorgenVikingGod@gmail.com) #
# >> https://github.com/Jorgen-VikingGod #
# #
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
# #
###############################################################################
*/
#include <QApplication>
#include "DarkStyle.h"
#include "framelesswindow.h"
#include "mainwindow.h"
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
// style our application with custom dark style
QApplication::setStyle(new DarkStyle);
// create frameless window (and set windowState or title)
FramelessWindow framelessWindow;
//framelessWindow.setWindowState(Qt::WindowFullScreen);
//framelessWindow.setWindowTitle("test title");
framelessWindow.setWindowIcon(a.style()->standardIcon(QStyle::SP_DesktopIcon));
// create our mainwindow instance
MainWindow *mainWindow = new MainWindow;
// add the mainwindow to our custom frameless window
framelessWindow.setContent(mainWindow);
framelessWindow.show();
return a.exec();
}