-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (25 loc) · 739 Bytes
/
Copy pathmain.cpp
File metadata and controls
35 lines (25 loc) · 739 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
// main.cpp
#include <QApplication>
#include <QDesktopWidget>
#include "window.h"
char * filename=NULL;
int main(int argc, char *argv[])
{
if(argc==2)
{
filename=argv[1];
}
QApplication app(argc, argv);
Window window;
//window.ui->myGLWidget->getPoints(filename);
window.resize(window.sizeHint());
int desktopArea = QApplication::desktop()->width() *
QApplication::desktop()->height();
int widgetArea = window.width() * window.height();
window.setWindowTitle("OpenGL with Qt");
if (((float)widgetArea / (float)desktopArea) < 0.75f)
window.show();
else
window.showMaximized();
return app.exec();
}