Overview
The Qt integration provides:- ZepDisplay_Qt: Rendering backend using QPainter
- ZepWidget_Qt: Ready-to-use Qt widget
- ZepFont_Qt: Font management using QFont
include/zep/qt/ directory.
Quick Start
Complete Working Example
Here’s a complete Qt application with Zep integration:MainWindow Header
mainwindow.h
MainWindow Implementation
mainwindow.cpp
Main Application
main.cpp
CMakeLists.txt for Qt
CMakeLists.txt
Font Configuration
Zep automatically uses monospace fonts appropriate for your platform:Custom Fonts
To use a custom font:Display Rendering
How ZepDisplay_Qt Works
The Qt display backend uses QPainter for all rendering:Drawing Primitives
Widget Integration
TheZepWidget_Qt class handles all the Qt-specific integration:
- Mouse events: Click, drag, wheel
- Keyboard events: Text input, special keys
- Paint events: Automatic refresh
- Focus handling: Cursor blinking, selection
Custom Widget Wrapper
You can create your own widget wrapper:DPI Scaling
Zep automatically handles high-DPI displays on Qt:Features
Styling
You can customize the Qt widget appearance:Next Steps
Editor API
Learn about the core editor API
Vim Mode
Explore Vim keybindings
