Skip to content

Instantly share code, notes, and snippets.

@hackaugusto
Created January 3, 2012 15:42
Show Gist options
  • Select an option

  • Save hackaugusto/1555408 to your computer and use it in GitHub Desktop.

Select an option

Save hackaugusto/1555408 to your computer and use it in GitHub Desktop.
qt vs. windows
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
viewer.setMainQmlFile(QLatin1String("qml/qml/clocks.qml"));
viewer.showExpanded();
return app.exec();
}
#include "stdafx.h"
#include "AnnotatorApplication.h"
// The window application
INT APIENTRY _tWinMain(
HINSTANCE /*hInstance*/,
HINSTANCE /*hPrevInstance*/,
LPTSTR /*lpCmdLine*/,
INT /*nCmdShow*/)
{
ComPtr<IWindowApplication> mainApp;
// Create and initialize the main application object
HRESULT hr = SharedObject<AnnotatorApplication>::Create(&mainApp);
if (SUCCEEDED(hr))
{
// Start the message loop for the application
hr = mainApp->RunMessageLoop();
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment