2

i found multiple libraries on stackoverflow but i'm not familiar with libraries and how to include them in my project. for example i saw https://fukuchi.org/works/qrencode/ getting recomended but i don't get how can i include it in my project while instructions in the site are for linux or https://github.com/nayuki/QR-Code-generator/tree/master/cpp

i tried https://github.com/nayuki/QR-Code-generator/tree/master/cpp i put header and i don't know how to use it

  • Do have a look at the demo program: https://github.com/nayuki/QR-Code-generator/blob/master/cpp/QrCodeGeneratorDemo.cpp – Nayuki Apr 20 '23 at 03:42

1 Answers1

1

For Qt, I suggest you use https://github.com/ftylitak/qzxing. It includes everything you need to encode data to QR-code and to scan QR-codes from camera. You have both C++ and QML API. You have clear examples in the README.

To include in a cmake project instead, this is what I do:

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../deps/qzxing/src qzxing)

you can also configure which component to add.

Luca Carlon
  • 9,546
  • 13
  • 59
  • 91