int main(int argc, char *argv[]) { QApplication a(argc, argv); a.setFont(QFont("simsun", 9)); dataInterface = new DataInterface; logic = new Logic; animation = new Animation; gui = new GUI; //FIXME: use ClientUI login and then destroy it ClientUI c; #ifdef LOBBY c.disconnect(&c); Lobby l; l.show(); return a.exec(); #else if(c.exec() == QDialog::Accepted) { c.disconnect(&c); Lobby l; l.show(); return a.exec(); } return 0; #endif }
int main(int argc, char *argv[]) { QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); QApplication a(argc, argv); MainWindow w; Lobby lobby; QObject::connect(&lobby, SIGNAL(startGame(QString,qint16)), &w, SLOT(startGame(QString,qint16))); lobby.show(); return a.exec(); }