Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rectangle{
- id: rect
- width: parent.width
- height: 30
- MouseArea{
- anchors.fill: parent
- onClicked: {
- loader.source = ""
- GSignals.clearComponentCache()
- loader.sourceComponent = cameraPlayer
- loader.item.stopCamera()
- loader.item.startCamera()
- }
- }
- }
- Loader{
- id: loader
- anchors.top: rect.bottom
- width: parent.width
- height: parent.height - 40
- }
- Component {
- id: cameraPlayer
- Rectangle{
- function startCamera()
- {
- camera.start()
- }
- function stopCamera()
- {
- camera.stop()
- }
- anchors.fill: parent
- QMM.Camera {
- id: camera
- }
- QMM.VideoOutput {
- id: videoOutput
- autoOrientation: true
- width: parent.width
- source: camera
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement