How barry-ran/qtscrcpy works
QtScrcpy is a cross-platform desktop client for viewing and controlling Android devices over USB or Wi-Fi. The main workflow is to select/connect a device and start its service in the main dialog, then view and interact with its screen in a per-device window; group control can relay actions to other devices. The README also documents audio, recording, and key mapping. The tree omits QtScrcpyCore and key-map assets, so core device-service internals and key-map implementation are not expanded here; relationships are limited to shown references and documented behavior.
Main entry points: dialog.cpp Device dialog · videoform.cpp Device video window · main.cpp App startup · groupcontroller.cpp Group control
Components 20
Application
- App startup
QtScrcpy/main.cpp - Device dialog
QtScrcpy/ui/dialog.cpp
Device workflow
- QtScrcpyCore
- ADB tooling
- Group control
QtScrcpy/groupcontroller/groupcontroller.cpp - Audio output
QtScrcpy/audio/audiooutput.cpp
Interface
- Device video window
QtScrcpy/ui/videoform.cpp - OpenGL renderer
QtScrcpy/render/qyuvopenglwidget.cpp - Metal renderer
QtScrcpy/render/metalvideowindow.h - Device toolbar
QtScrcpy/ui/toolform.cpp - Encoder presets
QtScrcpy/ui/encoderpreset.cpp - Preset settings
QtScrcpy/ui/presetconfigdialog.cpp - Magnetic widget
QtScrcpy/uibase/magneticwidget.cpp
Runtime support
- User configuration
QtScrcpy/util/config.cpp - Single instance
QtScrcpy/util/singleinstance.cpp - Icon helper
QtScrcpy/fontawesome/iconhelper.cpp - Mouse event tap
QtScrcpy/util/mousetap/mousetap.cpp - Platform mouse taps
QtScrcpy/util/mousetap
Other components
- Desktop user
- Android device
Connections 26
- Desktop user → App startup: launches
- App startup → Device dialog: opens
QtScrcpy/main.cpp - App startup → User configuration: loads settings
QtScrcpy/main.cpp - App startup → Single instance: checks instance
QtScrcpy/main.cpp - Device dialog → User configuration: reads settings
QtScrcpy/ui/dialog.cpp - Device dialog → ADB tooling: runs commands
QtScrcpy/ui/dialog.cpp - Device dialog → QtScrcpyCore: connects device
QtScrcpy/ui/dialog.cpp - ADB tooling → Android device: connects over USB/Wi-Fi
- QtScrcpyCore → Android device: starts service
- QtScrcpyCore → Device video window: delivers video frames
- Device video window → OpenGL renderer: renders frames
QtScrcpy/ui/videoform.cpp - Device video window → Metal renderer: renders frames
QtScrcpy/ui/videoform.cpp - Device video window → Device toolbar: opens toolbar
QtScrcpy/ui/videoform.cpp - Device video window → Mouse event tap: enables event tap
QtScrcpy/ui/videoform.cpp - Mouse event tap → Platform mouse taps: selects implementation
QtScrcpy/util/mousetap/mousetap.cpp - Device dialog → Group control: manages group control
QtScrcpy/ui/dialog.cpp - Group control → QtScrcpyCore: dispatches device actions
QtScrcpy/groupcontroller/groupcontroller.cpp - Group control → Device video window: checks host window
QtScrcpy/groupcontroller/groupcontroller.cpp - Device dialog → Audio output: starts audio
QtScrcpy/ui/dialog.cpp - Device dialog → Preset settings: configures presets
- Preset settings → Encoder presets: uses preset data
- Device dialog → Device video window: creates device window
QtScrcpy/ui/dialog.cpp - Device video window → Icon helper: uses icons
QtScrcpy/ui/videoform.cpp - Device toolbar → Group control: supports group actions
QtScrcpy/ui/toolform.cpp - Device toolbar → Magnetic widget: inherits widget behavior
- Device dialog → Android device: selects connection