-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.cpp
More file actions
27 lines (23 loc) · 691 Bytes
/
main.cpp
File metadata and controls
27 lines (23 loc) · 691 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
#include "mainwindow.h"
#include "aboutbox.h"
#include <QApplication>
void setup(MainWindow *w){
QDesktopWidget widget;
QRect windowSize = widget.availableGeometry(widget.primaryScreen());
int screenWidth = windowSize.width();
int screenHeight = windowSize.height();
windowSize.setWidth(screenWidth-200);
windowSize.setHeight(screenHeight-100);
w->setGeometry(windowSize);
w->move((screenWidth - w->width())/2,(screenHeight - w->height())/2);
QString title("Comic Aggregator");
w->setWindowTitle(title);
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
setup(&w);
w.show();
return a.exec();
}