main.cpp 740 B

12345678910111213141516171819202122232425
  1. #include <QApplication>
  2. #include "qmlapplicationviewer.h"
  3. #include <QDeclarativeContext>
  4. #include <QCamera>
  5. #include <QCameraImageCapture>
  6. #include "camfeatures.h"
  7. // Uses
  8. // http://www.developer.nokia.com/Community/Wiki/CamFeatures:_QML_component_to_get_camera_capabilities
  9. Q_DECL_EXPORT int main(int argc, char *argv[])
  10. {
  11. QScopedPointer<QApplication> app(createApplication(argc, argv));
  12. qmlRegisterType<cameraFeatures>("CameraFeatures", 1, 0, "CameraFeatures");
  13. QmlApplicationViewer viewer;
  14. viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
  15. viewer.setMainQmlFile(QLatin1String("qml/SensorCamera/main.qml"));
  16. viewer.showExpanded();
  17. return app->exec();
  18. }