#include #include #include "maindialog.hpp" int main(int argc, char *argv[]) { QApplication app(argc, argv); // Now we make sure the current dir is set to application path QDir dir(QCoreApplication::applicationDirPath()); #if defined(Q_OS_WIN) if (dir.dirName().toLower() == "debug" || dir.dirName().toLower() == "release") { dir.cdUp(); } #elif defined(Q_OS_MAC) if (dir.dirName() == "MacOS") { dir.cdUp(); dir.cdUp(); dir.cdUp(); } #endif QDir::setCurrent(dir.absolutePath()); MainDialog dialog; return dialog.exec(); }