Coders Packet

Qr Code Generator using text in C++

By Saif Ali Khan

A Qr Code Generator (using text) GUI application made in C++ using wxWidgets on Code::Blocks.

folder containing saved png images

IMAGE 1 (Main Folder where png image will be saved)

main application

IMAGE 2(Main Gui interface, at back code::blocks interface)

chech qr online whether it is working right or not

IMAGE 3 (chech the qr created on any qr code scanner)

QR CODE GENERATOR USING TEXT IN C++

1. INTRODUCTION:- This project is my first ever GUI application project that is desktop based and working properly without any errors. So basically, I created the project in C++, it is object-oriented as well as procedural. And the purpose to choose C++ for the project is that most desktop applications are made in C or C++ as these languages can directly connect to hardware components of a desktop and provide cross-platform usage. As is known, I also used a cross-platform GUI library called wxWidgets in this project and used Code::blocks IDE for the development. I opted for a dark theme because of its appealing user experience.

2. Installation Guide:- Firstly you have to install a C++ compiler like MINGW (gcc, g++) and make its usage global by setting it in the environment variable for the system path. And then you have to install Code::Blocks IDE and wxWidgets to start development. You can download all the above technologies from their official websites. And also download the Qr code library of Nayuki.

3. Setting up Project:- Open Code::blocks and set up wxWidgets as a global variable by going into the settings option, you just have to set paths of where you installed wxWidgets, and add its folder to the base along with bin and lib to their specific allocated places. After doing this create a new project, select wxWidgets and give the necessary details and make sure to choose a frame-based application, and then start working on your project's development. Make sure that C++ 2011 ISO(g++) is selected in build options(Compiler as well) and the linker library is of the correct version as well. In the end, perform build and run operations to test your project. And add Nayuki library qrcodegen.hpp and qrcodegen.cpp to the header and source of your project.

4. Requirements:- C++ compiler, IDE, wxWidgets, code knowledge, Nayuki library for QR code.

5. Usage:- You must create wxFrame and add a title to it and then create a label, with two text fields, a static bit map and a button that will generate a QR code, on text field will hold up the QR code generated name (.png file) and one is in which you will give a text to generate qr code on. And do make sure to code inside the function of a button in the QRMain.cpp file. And the label will be for showing saving your file. And the image file will automatically be saved inside your project folder.

6. Results:- After completing your development, You can test different URLs and names and can scan it, to check whether it is correct or not.

Download Complete Code

Comments

No comments yet

Download Packet

Reviews Report

Submitted by Saif Ali Khan (saifcore7)

Download packets of source code on Coders Packet