main.cpp 591 B

1234567891011121314151617181920212223242526272829303132
  1. #include "mainwindow.h"
  2. #include <QApplication>
  3. std::string gstrdirpath;
  4. std::string gstrxmlpath;
  5. int main(int argc, char *argv[])
  6. {
  7. QApplication a(argc, argv);
  8. if(argc < 2)
  9. {
  10. gstrdirpath = QCoreApplication::applicationDirPath().toStdString();
  11. }
  12. else
  13. {
  14. gstrdirpath = argv[1];
  15. }
  16. if(argc < 3)
  17. {
  18. gstrxmlpath = QCoreApplication::applicationDirPath().toStdString();
  19. gstrxmlpath = gstrxmlpath + "/IVSysMan.xml";
  20. }
  21. else
  22. {
  23. gstrxmlpath = argv[2];
  24. }
  25. MainWindow w;
  26. w.show();
  27. return a.exec();
  28. }