QR / Barcode sanner Qt/QML, C++ Application (UART)
ScanView is a lightweight desktop application built with Qt (QML + C++) that reads QR code and barcode data via UART using a serial-connected scanner. The application listens to incoming serial data in real time, decodes the scanned content, and displays it instantly on the user interface.
The system monitors the scanner’s connection state continuously and detects device disconnection events (such as unplugging the USB-UART device). When a disconnection occurs, the application safely closes the serial port and alerts the user through the UI. This ensures reliable operation in real-world hardware environments.
The project demonstrates practical integration between hardware devices and desktop software, using Qt’s QSerialPort for communication and QML for a responsive, modern UI.
- C++
- Qt (QML, Qt Quick Controls)
- QSerialPort
- UART / USB-Serial communication
Before running the application, make sure you have the following installed:
- Qt 6.x (with Qt Quick and Qt Serial Port modules)
- C++ compiler
- MSVC (Windows) or GCC / Clang (Linux/macOS)
- A QR or barcode scanner that supports UART / USB-Serial
- USB-to-UART driver (if required by the scanner)
git clone https://github.com/Muhammedsuwaneh/uart-scanview.git
cd uart-scanview- Open the project in Qt Creator
- Launch Qt Creator
- Open the .pro / CMakeLists.txt file
- Select a Qt 6 kit
- Build the project
- Click Build or press Ctrl + B
- Connect the scanner
- Plug the QR / barcode scanner into your PC
- Note the serial port name:
- Windows → COM3, COM4, …
- Linux → /dev/ttyUSB0
- macOS → /dev/tty.usbserial-*
- Click Run or press Ctrl + R
- Press Start Scanner in the UI
- Update the serial port name in the code if needed
1.0.0
Under MIT - Copyright 2025/2026






