vkrause added a comment.
The interface for outputting barcodes is currently QImage. The problem is
that QtQuick cannot directly consume a QImage without custom glue code (image
provider, custom item, etc), unlike e.g. a QLabel. Using an image provider
would allow standard Image elements to consume the barcode, I decided against
that approach though as the "API" in that case is an URL, ie. you'd need to
encode the content, the type and any other parameter inside a single URL. This
might be conceptually cleaner, but as an "API" it is just plain ugly.
Supporting custom AbstractBarcode subclasses is indeed something I haven't
thought about. It would probably require you to obtain an instance somehow and
pass that into the Barcode element as an opaque handle as far as QML is
concerned. This would need an additional property on the Barcode element, not a
big deal I think. I'm reluctant to add this blindly now though, given I have no
actual test-case for this.
Therefore, for me the choice here is mostly about where to put the necessary
glue code, with the alternative being my application (I don't think a tier2
KF5PrisonQuick makes sense for this). With Plasma apparently having similar
needs sharing this somewhere seems sensible though.
To: vkrause, #frameworks, svuorela
Cc: broulik, davidedmundson, michaelh