actually the those if(...); weren't supposed to be if statements in the first place, since the result is always true at that point of code anyway.
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}