A modern, feature-rich QR code generator with beautiful dark/light theme support, real-time preview, custom styling options, and persistent storage of generation history.
QR Generator SC is a professional-grade QR code generation application built with Flet and Python. It provides an intuitive interface for creating QR codes with full customization capabilities including custom colors, sizes, margins, and supports multiple QR code types (URL, Email, Text). The application maintains a generation history with persistent settings and offers seamless switching between dark and light themes.
- Multiple QR Types: Generate QR codes for URLs, email addresses, and plain text content
- Custom Styling: Full color customization (foreground and background), adjustable size (256x256 to 1024x1024 px), and margin control
- Real-time Preview: Instant QR code preview as you adjust settings and content
- Generation History: Persistent storage of previously generated QR codes with quick access and reload capability
- Dark/Light Themes: Toggle between professional dark and light themes without losing your work
- One-Click Export: Download generated QR codes as PNG files
- PDF Export: Export single or multiple QR codes as PDF documents
- Batch Export: Generate and export multiple QR codes at once from history
- Persistent Settings: Automatically saves your color preferences, size, and margin settings across sessions
- Modern UI: Clean, flat design system with accessible color tokens and responsive layout
- Go to Releases
- Download
QRGeneratorSC.exe - Run it directly (no Python installation needed)
-
Clone the repository:
git clone https://github.com/sebastiancaamano/qr-generator-sc cd qr_generator_sc -
Install dependencies:
pip install -r requirements.txt
-
Run:
python main.py
The application will launch with the default light theme. Use the theme toggle button to switch to dark mode.
- Select QR Type: Choose from URL, Text, Email, WiFi, WhatsApp, SMS, Phone, GPS, or vCard using the dropdown menu
- Enter Content: Fill in the dynamic fields for the selected type (e.g. SSID/password for WiFi, phone number for WhatsApp)
- Customize Appearance (optional):
- Click the color swatches or enter hex values to change foreground/background colors
- Select a size from the dropdown (256, 512, 1024 pixels)
- Adjust the margin value (border around the QR code)
- Preview: The QR code updates in real-time as you modify settings
- Download: Click the "Download QR Code" button to save as PNG
- Export SVG: Under Export As β SVG, click Export to save a vector
.svgfile - Export PDF: Under Export As β PDF, click Export to save as a PDF document
Generate and export multiple QR codes at once from your history:
- Click the "Batch Export" button in the history panel
- Select the QR codes you want to include in the export
- Choose the export format (PNG or PDF)
- Click "Export Selected" to generate a zip file containing all selected QR codes
The left sidebar displays all previously generated QR codes. Click any entry to:
- Pre-fill the form with that QR code's settings
- View the original content and customization options
- Make modifications and regenerate
Use the flag button (πΊπΈ / πͺπΈ) in the top bar to toggle between English and EspaΓ±ol. The choice is saved automatically and applied instantly without losing form data or the current QR preview.
Use the theme toggle (icon in the header) to switch between dark and light themes. All your current work, color customization, and form state are preserved during the theme switch.
The application follows a clean, layered architecture:
qr_generator_sc/
βββ main.py # Application entry point
βββ requirements.txt # Python dependencies
βββ qr_generator_sc.spec # PyInstaller configuration
βββ README.md # Documentation
βββ assets/ # Icons and images
β
βββ ui/ # User interface components
β βββ app_shell.py # Main application container and theme management
β βββ generator_view.py # QR generation form and preview
β βββ history_panel.py # Generation history sidebar
β βββ project_panel.py # Project management
β βββ batch_export_dialog.py # Batch export dialog
β βββ components.py # Reusable UI components
β
βββ services/ # Business logic layer
β βββ qr_service.py # QR code image generation and export
β βββ svg_export_service.py # Vector SVG export
β βββ pdf_export_service.py # PDF export service
β βββ multipage_pdf_export_service.py # Multi-page PDF export service
β βββ qr_content_service.py # Field validation and payload building
β βββ logo_service.py # Logo processing
β
βββ qr_types/ # QR payload builders
β βββ base.py # Builder base class and field definitions
β βββ simple_builders.py # URL, Text, Email
β βββ wifi_builder.py
β βββ whatsapp_builder.py
β βββ sms_builder.py
β βββ phone_builder.py
β βββ gps_builder.py
β βββ vcard_builder.py
β
βββ validators/ # Shared field validators
β βββ common.py
β
βββ i18n/ # Internationalization
β βββ translation_manager.py
β βββ translations_en.py
β βββ translations_es.py
β
βββ models/ # Data models
β βββ qr_entry.py # QR code entry data structure
β βββ project.py # Project model
β
βββ storage/ # Data persistence layer
β βββ history_storage.py # History JSON persistence
β βββ project_storage.py # Projects JSON + folders
β βββ settings_storage.py # Settings and preferences persistence
β
βββ themes/ # Design system
βββ theme_manager.py # Theme state and color resolution
βββ tokens.py # Design tokens and color definitions
qr_service.py: Handles QR code generation using the qrcode library with PIL backend. Supports preview generation at 240px (for display) and configurable export sizes (256, 512, 1024 px) with custom margins and colors.
pdf_export_service.py: Provides PDF export functionality for single QR codes, generating properly formatted PDF documents with embedded QR code images.
multipage_pdf_export_service.py: Handles multi-page PDF export for batch operations, creating PDF documents with multiple QR codes arranged across pages.
batch_export_dialog.py: UI component for batch export functionality, allowing users to select multiple QR codes from history and export them in various formats (PNG or PDF)
theme_manager.py: Central theme management system providing color token resolution. Supports light/dark mode toggle while preserving application state during transitions.
storage/: Dual persistence layer:
history_storage.py: Maintains a list of generated QR codes with their settingssettings_storage.py: Persists user preferences including theme selection, default colors, size, and margin
- Python 3.10+
- Flet 0.85.2
- qrcode[pil]
- Pillow
See requirements.txt for the complete dependency list and installation instructions.
Settings are automatically saved to ~/.qr_generator_sc/settings.json:
{
"theme": "light",
"qr_foreground_color": "#000000",
"qr_background_color": "#FFFFFF",
"qr_size": 512,
"qr_margin": 4,
"last_qr_type": "URL"
}Generated QR codes history is stored in ~/.qr_generator_sc/history.json.
Note: Settings are managed through the UI. Manual editing of configuration files is not recommended as the application will overwrite them on next launch.
QR Code not generating? Ensure the content field is not empty and matches the selected QR type. For email, use a complete email address; for URL, include the protocol (http:// or https://).
Theme toggle not working? Restart the application. Your settings are automatically saved, so your preferences will be restored on next launch.
Previous QR codes not showing in history? Check that
~/.qr_generator_sc/history.jsonexists and is readable. You may need to generate a new QR code to initialize the history file.
pyinstaller qr_generator_sc.spec
# Output: dist/QRGeneratorSCpyinstaller qr_generator_sc.spec
# Output: dist/QRGeneratorSC.exeThis project follows the Flat Design System (typeui.sh) strictly:
| Token | Value |
|---|---|
| Primary | #F2673C |
| Secondary | #8B5CF6 |
| Success | #16A34A |
| Warning | #D97706 |
| Danger | #DC2626 |
| Font | Inter / JetBrains Mono |
| Spacing | 4 / 8 / 12 / 16 / 24 / 32 |
No gradients, no 3D shadows, no decorative motion without purpose.
- OOP + SOLID β each class has a single responsibility
- Separation of Concerns β UI / Services / Storage / Themes / Models are fully isolated
- Dependency injection β
ThemeManagerandHistoryStorageare injected, not imported globally - Flat component factory β
FlatComponentsreads live theme tokens; re-theming is instant