Skip to content

Designed a QR code generator app that creates customizable QR codes for validated URLs.

Notifications You must be signed in to change notification settings

dheerajkallakuri/QRCodeGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

QR Code Generator App

Project Overview

The main aim of this project is to create a QR code for any website submitted via the app. The app provides a user-friendly interface for generating customizable QR codes with different patterns, colors, and sizes. It also validates the submitted URL and allows users to save the generated QR code with a timestamped filename.

Project Structure

The project consists of two main Python files:

  1. app.py (Frontend using PyQt5)
  2. qrcode_gen.py (QR Code generation and URL validation logic)

app.py

This file contains the frontend code for the app built with PyQt5. The app provides:

  • An input field to enter the URL for which a QR code is to be generated.
  • Two buttons:
    1. Generate QR Code: Generates a QR code with random patterns, colors, and backgrounds.
    2. Save QR Code: Saves the generated QR code with a default timestamped filename.
  • A display area that shows the QR code once it is generated. Each time the "Generate QR Code" button is clicked, a new QR code with a different design is displayed.

Additional features:

  • If the URL entered is invalid, an error message is displayed, asking the user to input a valid URL.
  • Once the QR code is saved, a popup message confirms that the QR code has been successfully saved.

qrcode_gen.py

This file contains the core logic for QR code generation and URL validation:

  • generate_qr_code function: This function is called by app.py to generate the QR code when the user clicks the "Generate QR Code" button.
  • URL validation is also handled in this file, ensuring the URL format is correct before generating the QR code.
  • QR codes are generated with random patterns, colors, and fixed sizes, offering a variety of styles.
  • QR codes are saved with a default timestamp as filename in a specified folder.

Results

Sample output showing various QR codes generated by the app with different patterns and background colors.

Screenshot 2024-09-06 at 6 22 27 PM Screenshot 2024-09-06 at 6 22 57 PM

How to Run the Project

  1. Clone or download the repository to your local machine.
  2. Install all required libraries from the requirements.txt file:
    pip install -r requirements.txt
  3. Run the app by executing app.py:
    python app.py

Requirements

Ensure the following Python libraries are installed (available in requirements.txt):

  • PyQt5
  • qrcode
  • Pillow (for image manipulation)

About

Designed a QR code generator app that creates customizable QR codes for validated URLs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages