main.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
  3. * All rights reserved.
  4. * This component and the accompanying materials are made available
  5. * under the terms of "Eclipse Public License v1.0"
  6. * which accompanies this distribution, and is available
  7. * at the URL "http://www.eclipse.org/legal/epl-v10.html".
  8. *
  9. * Initial Contributors:
  10. * Nokia Corporation - initial contribution.
  11. *
  12. * Contributors:
  13. *
  14. * Description: Part of Qt NFC Setting sample application.
  15. */
  16. #include "main.h"
  17. #include "mainwindow.h"
  18. #include <QtGui/QApplication>
  19. #include <QtCore/QLocale>
  20. #include <QtCore/QTranslator>
  21. #include <QtCore/QTextCodec>
  22. int main(int argc, char *argv[])
  23. {
  24. QApplication app(argc, argv);
  25. QString locale = QLocale::system().name();
  26. QTranslator translator;
  27. translator.load(QString("nfcsettingsapplication_") + locale);
  28. app.installTranslator(&translator);
  29. QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
  30. MainWindow mainWindow;
  31. mainWindow.setOrientation(MainWindow::ScreenOrientationAuto);
  32. mainWindow.showExpanded();
  33. return app.exec();
  34. }