qtwrappingmain.cxx 528 B

123456789101112131415161718192021222324252627
  1. #include "qtwrapping.h"
  2. #include <qapplication.h>
  3. #ifndef _WIN32
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #endif
  7. int main(int argc, char* argv[])
  8. {
  9. #ifndef _WIN32
  10. const char* display = getenv("DISPLAY");
  11. if (display && strlen(display) > 0) {
  12. #endif
  13. QApplication app(argc, argv);
  14. qtwrapping qtw;
  15. app.setMainWidget(&qtw);
  16. #ifndef _WIN32
  17. } else {
  18. printf("Environment variable DISPLAY is not set. I will pretend like the "
  19. "test passed, but you should really set it.\n");
  20. }
  21. #endif
  22. return 0;
  23. }