- Notifications
You must be signed in to change notification settings - Fork1
hocinilotfi/Video-Streaming-in-PyQt-using-OpenCV
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This tutorial shows how to build a desktop application with modern GUI for video streaming in python using PyQt and OpenCV.
We assume thatpython,pip andvirtualenv are already installed.For more details about Pip and Virtual Environment , please refer to this [link]:https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/"Using Pip and Virtual Environment"
Create an initial project directory and name it for example:Video-Streaming-in-PyQt-using-OpenCV
UsingTerminal (orcmd ...), navigate to your project root directory:
cd path_to_your_project_directoryIn my case :
cd /home/lotfi/Documents/vs-code-projects/Video-Streaming-in-PyQt-using-OpenCVOr simply, navigate to your project directory in your file manger -> mouse right click -> Open Terminal here.
Create a virtual environment and name it for exampleenv:
python3 -m venv env
Activate the virtual environment that we created:
source env/bin/activateThe output should be as in the following image, where you can see the name of your environment at the beginning of the line:
After activating the virtual environment, to install the PyQt5 package, type in terminal:
python3 -m pip install PyQt5
and to install OpenCV
python3 -m pip install opencv-python-headless
The simplest way to create a PyQt GUI application is use Qt5 Designer.
If you have not yet installed Qt5 Designer, you can install it using pip:
python3 -m pip install pyqt5-tools
and to run it, type:
qt5-tools designer
You can also install Qt5-Designer globally in your system, for example, to install it ondebian:
sudo apt install qttools5-dev-toolsand to run it using Terminal, enter :
designerOnWindows andMac, one can download it from this [link]:https://build-system.fman.io/qt-designer-download, and then, install it.
- Run designer -> select Main Window -> Press Create
- In Object inspector, remove menu and statusbar:
- Drag two frames from the Widgets Box to the Main Window
About
Video Streaming in PyQt dark GUI using OpenCV
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.


