Revert most of optimisation except for some obvious fixes to errors someone or other introduced.
Something in the rest appears related to a crash in translation. Until I determine why or what, this stays out to not ruin people's games
#include <QApplication>
#include "mainform.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyWindow *mainWin = new MyWindow;
mainWin->show();
return app.exec();
}