cmake/Tests/Wrapping/qtwrappingmain.cxx

28 lines
532 B
C++
Raw Normal View History

#include "qtwrapping.h"
2016-07-09 11:21:54 +02:00
#include <qapplication.h>
#ifndef _WIN32
2018-08-09 18:06:22 +02:00
# include <stdio.h>
# include <stdlib.h>
#endif
2016-07-09 11:21:54 +02:00
int main(int argc, char* argv[])
{
#ifndef _WIN32
const char* display = getenv("DISPLAY");
2016-07-09 11:21:54 +02:00
if (display && strlen(display) > 0) {
#endif
2016-07-09 11:21:54 +02:00
QApplication app(argc, argv);
qtwrapping qtw;
app.setMainWidget(&qtw);
#ifndef _WIN32
2016-07-09 11:21:54 +02:00
} else {
printf("Environment variable DISPLAY is not set. I will pretend like the "
"test passed, but you should really set it.\n");
}
#endif
return 0;
}