qtwrappingmain.cxx 529 B

1234567891011121314151617181920212223242526272829
  1. #include <qapplication.h>
  2. #include "qtwrapping.h"
  3. #ifndef _WIN32
  4. # include <stdlib.h>
  5. # include <stdio.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. {
  13. #endif
  14. QApplication app(argc,argv);
  15. qtwrapping qtw;
  16. app.setMainWidget(&qtw);
  17. #ifndef _WIN32
  18. }
  19. else
  20. {
  21. printf("Environment variable DISPLAY is not set. I will pretend like the test passed, but you should really set it.\n");
  22. }
  23. #endif
  24. return 0;
  25. }