Created
January 3, 2012 15:42
-
-
Save hackaugusto/1555408 to your computer and use it in GitHub Desktop.
qt vs. windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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