2002-09-12 00:41:11 +04:00
|
|
|
#include "qtwrapping.h"
|
2016-04-29 17:53:13 +03:00
|
|
|
#include <qapplication.h>
|
2002-09-12 00:41:11 +04:00
|
|
|
|
2003-04-02 18:01:33 +04:00
|
|
|
#ifndef _WIN32
|
2016-05-16 17:34:04 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2003-04-02 18:01:33 +04:00
|
|
|
#endif
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
int main(int argc, char* argv[])
|
2002-09-12 00:41:11 +04:00
|
|
|
{
|
2003-04-02 18:01:33 +04:00
|
|
|
#ifndef _WIN32
|
|
|
|
const char* display = getenv("DISPLAY");
|
2016-05-16 17:34:04 +03:00
|
|
|
if (display && strlen(display) > 0) {
|
2003-04-02 18:01:33 +04:00
|
|
|
#endif
|
2016-05-16 17:34:04 +03:00
|
|
|
QApplication app(argc, argv);
|
2002-09-12 00:41:11 +04:00
|
|
|
|
2003-04-02 18:01:33 +04:00
|
|
|
qtwrapping qtw;
|
|
|
|
app.setMainWidget(&qtw);
|
|
|
|
#ifndef _WIN32
|
2016-05-16 17:34:04 +03:00
|
|
|
} else {
|
|
|
|
printf("Environment variable DISPLAY is not set. I will pretend like the "
|
|
|
|
"test passed, but you should really set it.\n");
|
|
|
|
}
|
2003-04-02 18:01:33 +04:00
|
|
|
#endif
|
2002-09-12 00:41:11 +04:00
|
|
|
|
2003-04-02 18:01:33 +04:00
|
|
|
return 0;
|
2002-09-12 00:41:11 +04:00
|
|
|
}
|