Skip to content

sailfishos/qr-filter-qml-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qr-filter-qml-plugin

qr-filter-qml-plugin allows you to work with QR codes via QML. Based on zxing-cpp. Currently only QR-code reading is availaible.

How to use

Plugin based on VideoOutput qml-feature - filters.

import Amber.QrFilter 1.0

VideoOutput {
    id: videoOutput
    filters: [ qrFilter ]
}

QrFilter {
    id: qrFilter
}

QrFilter is inherited from QAbstractVideoFilter, so all properties from QAbstractVideoFilter, e.g. active state can be used.

QrFilter {
    id: qrFilter
    active: camera.mode == "image" // enable filter only on image mode
}

Additionally QrFilter provide result property, where reading result is stored and explicit invokable method for clearing result clearResult.

property string passResult

VideoOutput {
    id: videoOutput
    filters: [ qrFilter ]
}

QrFilter {
    id: qrFilter
}

Button {
    visible: qrFilter.result.length !== 0 ? 1.0 : 0.0
    onClicked: {
        passResult = qrFilter.result
        qrFilter.clearResult()
    }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •