https://bugs.kde.org/show_bug.cgi?id=337412
JZA <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from JZA <[email protected]> --- It's been 11 years since this bug has been created. It's obvious the code has been implemented on other crypto wallets using Qt so there is code that can be integrated from Qt wallets to open the camera, scan QR as well as generate new QR code. These wallets being open source should be reasonably easy to port into kleopatra. The original Satoshi wallet git has this section of it's codebase here: Qt uses qrencode library to generate the QR codes for the addresses. And can be found here: src/qt/addressbookpage.cpp src/qt/receivecoinsdialog.cpp src/qt/qrcodedialog.h The description of how it works is the following: How It Works: When a user clicks "Show QR Code" for an address, the wallet calls a function to generate a QR code image using the qrencode library. The address (a string) is passed to qrencode, which generates a QR code image (e.g., as a QImage or QPixmap in Qt). The image is then displayed in a dialog or embedded in the GUI. Example code: ``` #include <qrencode.h> // ... QImage generateQRCode(const QString &address) { QRcode *qrcode = QRcode_encodeString(address.toUtf8().constData(), 0, QR_ECLEVEL_L, QR_MODE_8, 1); // Convert QRcode to QImage and return // ... } ``` -- You are receiving this mail because: You are watching all bug changes.
