-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
36 lines (29 loc) · 827 Bytes
/
main.cpp
File metadata and controls
36 lines (29 loc) · 827 Bytes
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 "collision.h"
#include<QApplication>
#include<QDesktopWidget>
#include <QImage>
#include <QRect>
//Main
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
//variables
int posx, posy;
int screenW;
int screenH;
int WIDTH = 500;//monitor size width
int HEIGHT = 500;//monitor size height
QDesktopWidget *desktop = QApplication::desktop();
//get size of monitor
screenW = desktop->width();
screenH = desktop->height();
posx = (screenW - WIDTH) / 2;
posy = (screenH - HEIGHT) / 2;
collision window;
window.setGeometry(posx, posy, WIDTH, HEIGHT);
window.setFixedSize(WIDTH, HEIGHT);
window.setWindowTitle("HUNT");
// window.setStyleSheet("background-image:Image/background.png");
window.show();
return app.exec();
}