2002-09-11 16:41:11 -04:00
|
|
|
#include "qtwrapping.h"
|
2016-04-29 10:53:13 -04:00
|
|
|
#include <qapplication.h>
|
2002-09-11 16:41:11 -04:00
|
|
|
|
2003-04-02 09:01:33 -05:00
|
|
|
#ifndef _WIN32
|
2016-05-16 10:34:04 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2003-04-02 09:01:33 -05:00
|
|
|
#endif
|
|
|
|
|
2016-05-16 10:34:04 -04:00
|
|
|
int main(int argc, char* argv[])
|
2002-09-11 16:41:11 -04:00
|
|
|
{
|
2003-04-02 09:01:33 -05:00
|
|
|
#ifndef _WIN32
|
|
|
|
const char* display = getenv("DISPLAY");
|
2016-05-16 10:34:04 -04:00
|
|
|
if (display && strlen(display) > 0) {
|
2003-04-02 09:01:33 -05:00
|
|
|
#endif
|
2016-05-16 10:34:04 -04:00
|
|
|
QApplication app(argc, argv);
|
2002-09-11 16:41:11 -04:00
|
|
|
|
2003-04-02 09:01:33 -05:00
|
|
|
qtwrapping qtw;
|
|
|
|
app.setMainWidget(&qtw);
|
|
|
|
#ifndef _WIN32
|
2016-05-16 10:34:04 -04: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 09:01:33 -05:00
|
|
|
#endif
|
2002-09-11 16:41:11 -04:00
|
|
|
|
2003-04-02 09:01:33 -05:00
|
|
|
return 0;
|
2002-09-11 16:41:11 -04:00
|
|
|
}
|