#include #include #include "qmlapplicationviewer.h" int main(int argc, char *argv[]) { QScopedPointer app(createApplication(argc, argv)); QScopedPointer viewer(QmlApplicationViewer::create()); QZXing::registerQMLTypes(); viewer->setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait); viewer->setMainQmlFile(QLatin1String("qml/QMLBarcodeScanner/declarative-camera.qml")); viewer->showExpanded(); return app->exec(); }