Skip to content

Instantly share code, notes, and snippets.

@pamaury
Created December 16, 2013 15:50
Show Gist options
  • Save pamaury/7989249 to your computer and use it in GitHub Desktop.
Save pamaury/7989249 to your computer and use it in GitHub Desktop.
#include <QApplication>
#include <QDir>
#include <QDesktopWidget>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow win;
win.show();
win.setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter,
win.size(), app.desktop()->availableGeometry()));
return app.exec();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment