Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

To import pulgin in qml(Qt 4.7.4)

$
0
0
(opencv-camera-capture-with-qml) I am using this plugin from the below link http://f24h.altervista.org/blog/opencv-camera-capture-with-qml/ Here is the steps what I followed step 1   Under Qt Quick Project->Qt Quick Ui   Name : main Create in: /home/bts-007/QtSDK/work/   step 2   Extracted the(plugin) tar file with in the folder main   step 3   edited main.qml from the use case    import opencv.components 1.0       CvCamView {         id: camView         width: 800         height: 600         camera: 0         cameraState: CvCamView.ActiveState //unneeded because this is the default state         resolution: CvCamResolution {                         width: 800                         height: 600                     }         onNewFrame: {             console.log("new frame recived");             consumer.detectSomething(iplWidth, iplHeight, iplData);         }       }   step 4 changed main.qmlproject   import QmlProject 1.1   Project {     mainFile: "main.qml"       /* Include .qml, .js, and image files from current directory and subdirectories */     QmlFiles {         directory: "."     }     JavaScriptFiles {         directory: "."     }     ImageFiles {         directory: "."     }     /* List of plugin directories passed to QML runtime */     importPaths: [ "." ]  // this is the change what I made(set to current path) }   step 5 run the program. cvcamview_plugin.cpp #include "cvcamview_plugin.h" #include "cvcamview.h" #include "cvcamresolution.h" #include "cvhaardetector.h"   #include <QApplication> #include <QtDeclarative/qdeclarative.h>   void CvCamViewPlugin::registerTypes(const char *uri) {     // @uri opencv.components     qmlRegisterType<CvCamResolution>(uri, 1, 0, "CvCamResolution");     qmlRegisterType<CvCamView>(uri, 1, 0, "CvCamView");     qmlRegisterType<CvHaarDetector>(uri, 1, 0, "CvHaarDetector");   }   Q_EXPORT_PLUGIN2(CvCamView, CvCamViewPlugin) uri – opencv.components I am getting an error message module “opencv.components” is not installed import opencv.components 1.0 . I can access the properties but I don’t know why it is showing the error message

Viewing all articles
Browse latest Browse all 4972

Trending Articles