Skip to content
Learn to create desktop apps with Python and Qt
Branch: _
Clone or download
Latest commit bd0d85a Jun 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Update README.md Jun 24, 2019
README.md Update README.md Jun 21, 2019

README.md

PyQt Examples 2019

Learn to create desktop apps with Python and Qt. Screenshots on Ubuntu below. You can also use Windows or macOS.

PyQt QLabel PyQt widgets screenshot QVBoxLayout PyQt5 PyQt Signals and Slots Qt Designer Python
Hello World! Common PyQt Widgets Layouts Signals and Slots Qt Designer & Python
QML Python example Qt Text Editor PyQt5 exe Qt dark theme
QML Python example Qt Text Editor Packaging & deployment Qt Dark Theme
QPainter Python example PyQt Thread example QTreeView example in Python PyQt5 QListView
Action Shooter Chat Client Tree Views Lists
QAbstractTableModel example QAbstractTableModel example
Custom Tables PyQt database example

Running the examples

Running the examples is really easy. The only thing you need is Python 3. Create a virtual environment via the command:

python3 -m venv venv

This creates the folder venv/ in your current directory. It will contain the necessary libraries for running the examples.

To activate the virtual environment, use the following command:

# On Windows:
call venv\Scripts\actviate.bat
# On Mac / Linux:
source venv/bin/activate

Then, execute the following to install the necessary dependencies:

pip install -Ur src/requirements.txt

Once you have done this, use cd to navigate to the example you're interested in in the src/ folder. You'll find a .py file there, typically main.py. You can run it with the command:

python main.py

Please note that the virtual environment must still be active for this to work.

License

Except where otherwise indicated, the contents here are © me, Michael Herrmann. I'm happy for you to use the source code under the terms of the MIT license. The screenshots may be used under the terms of the CC BY-NC-SA 4.0.

You can’t perform that action at this time.