Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Felgo 3.0
- import QtQuick 2.0
- import QtMultimedia 5.9 as QMM
- App {
- id: app
- // You get free licenseKeys from https://felgo.com/licenseKey
- // With a licenseKey you can:
- // * Publish your games & apps for the app stores
- // * Remove the Felgo Splash Screen or set a custom one (available with the Pro Licenses)
- // * Add plugins to monetize, analyze & improve your apps (available with the Pro Licenses)
- // licenseKey: "657C6859AF3E2CE1E3BC84508657F4F6CEC3E36DC54DDF999F7ED9A5EDCC1A516870A9C3215BC1F733F7B1E8F3AD3FE346A7EDF713BA8639208DD874FEE2DF5E26CCBF96E7D29C5DCAFAB675AC93479E2971033C6883B695B4D25459999F3A54B4F38B313A6EFBBDC627637440C84AFAADA8AF9B82CD5DAF1965D4F1B05F0C2AB547E7780A9B6B8F4C0CE2687834C3AEF8ECCFDD2D07F561F79557908FF9D0C79EC7AB968B5F3A846020BF0B798B653A56ADB8967D9E4F8F16DEC4E01E6D4A2B136A3FFADA9F43E94CE3B76DDCEAAB12680966C70ECCA219A431CB5FD67ED5572F5B84903BAAEC33A40CEAE970131CC021FD9EFD7D914C1EA9B131C2FB00D5B67516BA34F93AB597C0210F05A60AECD156946083A2B03137BE9B16D265EB5A2312D1CFB5E0E711C395EBAE1741B89DDF5B23FD93797418E94E6996EC95C9ECF55F7B924BB32623B148004346C01914EA"
- 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