There. Push this back on to unc0rr. This effect can still desync, 'cause it always could, but at least now the two are linked w/o argument I think.
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}