qtwrappingmain.cxx 532 Bytes
Newer Older
Franck Bettinger's avatar
Franck Bettinger committed
1
#include "qtwrapping.h"
2
#include <qapplication.h>
Franck Bettinger's avatar
Franck Bettinger committed
3

4
#ifndef _WIN32
5 6
#  include <stdio.h>
#  include <stdlib.h>
7 8
#endif

9
int main(int argc, char* argv[])
Franck Bettinger's avatar
Franck Bettinger committed
10
{
11 12
#ifndef _WIN32
  const char* display = getenv("DISPLAY");
13
  if (display && strlen(display) > 0) {
14
#endif
15
    QApplication app(argc, argv);
Franck Bettinger's avatar
Franck Bettinger committed
16

17 18 19
    qtwrapping qtw;
    app.setMainWidget(&qtw);
#ifndef _WIN32
20 21 22 23
  } else {
    printf("Environment variable DISPLAY is not set. I will pretend like the "
           "test passed, but you should really set it.\n");
  }
24
#endif
Franck Bettinger's avatar
Franck Bettinger committed
25

26
  return 0;
Franck Bettinger's avatar
Franck Bettinger committed
27
}