QCAD is a cross-platform, open-source 2D computer-aided design (CAD) application designed for creating precise technical drawings such as architectural plans, mechanical schematics, and diagrams. Built with C++ and the Qt framework, it provides an intuitive interface suitable for beginners while offering advanced tools for professionals. It solves the need for a free, reliable, and extensible 2D CAD solution that works across major operating systems without vendor lock-in.
QCAD supports industry-standard formats like DXF and optionally DWG via proprietary plugins. Its architecture includes a C++ plugin system and a powerful ECMAScript/JavaScript scripting interface, allowing automation and customization. It can be compiled from source on Windows, macOS, and Linux, and includes command-line tools for batch processing.
What You Get
- DXF and DWG Support - Import and export technical drawings in DXF format natively, with optional DWG support via proprietary plugins for compatibility with AutoCAD files.
- Over 40 Construction Tools - Create precise geometry including points, lines, arcs, circles, ellipses, splines, polylines, and text with dedicated tools for technical drafting.
- Over 20 Modification Tools - Edit and manipulate entities with tools like move, rotate, scale, mirror, trim, extend, and fillet for detailed drawing adjustments.
- Layer and Block Management - Organize drawings with layers and reusable blocks (grouped entities) to streamline complex designs and maintain consistency.
- ECMAScript/JavaScript Scripting Interface - Automate tasks and extend functionality using a full-featured JavaScript engine with access to all CAD operations and entities.
- Part Library with 4,800+ CAD Components - Access a built-in library of pre-designed mechanical and architectural parts to accelerate drawing creation.
- Screen-Based Linetypes - View linetype patterns consistently regardless of scale, using pixel-based dash patterns instead of drawing-unit-based ones (introduced in QCAD 3.4).
- Command Line Tools (dwg2pdf, dwg2svg, etc.) - Batch convert DWG and DXF files to PDF, SVG, or bitmap formats without opening the GUI for automated workflows.
- Print to Scale and Multi-Page Printing - Precisely control output scaling and split large drawings across multiple printed pages for professional documentation.
- TrueType and 35 Built-in CAD Fonts - Use system fonts or specialized CAD fonts for annotations and labels in technical drawings.
Common Use Cases
- Designing architectural floor plans - Architects use QCAD to draft building layouts in meters or feet with layers for walls, doors, and furniture, leveraging its block library and print-to-scale features.
- Creating mechanical engineering schematics - Engineers generate part diagrams and assembly drawings using precise entity snapping, dimensioning tools, and the part library for standard components.
- Automating repetitive drafting tasks - Developers write JavaScript scripts to auto-generate dimension lines, label components, or batch-convert DXF files to PDF using QCAD’s command-line tools.
- Educational CAD instruction - Technical schools deploy QCAD as a free, cross-platform alternative to commercial CAD software for teaching 2D drafting fundamentals without licensing costs.
Under The Hood
Architecture
- Employs a plugin-based modular system with clear separation between GUI, core geometry, and application logic, enabling extensibility through domain-specific extensions
- Rigorously applies Model-View-Controller patterns, isolating geometric data, rendering, and input handling with well-defined interfaces
- Uses dependency injection via factory registration patterns to decouple entity creation from concrete implementations
- Leverages Strategy patterns in rendering and scene management to support pluggable backends and output formats
- Decomposes functionality into specialized modules with consistent interfaces, though legacy code exhibits inconsistent encapsulation
Tech Stack
- Built on a C++ core with Qt for cross-platform GUI, graphics primitives, and file I/O
- Implements custom parsers for DWG/DXF formats using native Qt utilities, preserving industrial drawing fidelity
- Uses Qt Designer and QML for UI components, with CMake for multi-platform build configuration
- Relies on Qt Test for basic validation but lacks comprehensive test automation
- Entirely standalone desktop application with embedded resources and no external dependencies
Code Quality
- Lacks automated testing, assertion-based validation, or structured error handling
- Test artifacts are primarily data files used for manual verification rather than executable test suites
- Naming conventions are domain-specific but inconsistent at the code level
- Minimal type safety or static analysis practices observed, with raw data inputs and no linting tooling
- Error conditions are often ignored or handled implicitly, increasing risk of silent failures
What Makes It Unique
- Features a CAD-specific geometric constraint solver that enables real-time parametric editing without manual locking
- Implements a custom vector graphics engine optimized for technical drawings with sub-pixel precision and non-destructive layering
- Includes a proprietary DXF/DWG parser that accurately handles legacy entities and block references where other tools fail
- Integrates a scriptable toolchain using JavaScript to bridge CAD design with CNC machining workflows
- Deploys an adaptive viewport system that maintains exact scale accuracy across all zoom levels and hardware configurations
- Contains an intelligent dimensioning engine that auto-positions annotations to comply with ISO standards without user intervention