Skip to content

Instantly share code, notes, and snippets.

@allanjos
Last active November 5, 2018 00:37
Show Gist options
  • Select an option

  • Save allanjos/08307087aee350122f5b2d998e2e6bf9 to your computer and use it in GitHub Desktop.

Select an option

Save allanjos/08307087aee350122f5b2d998e2e6bf9 to your computer and use it in GitHub Desktop.
PyQT on Windows

Install Python from: https://www.python.org/downloads/windows/

Install PyQt using pip:

pip3 install PyQt5

Create a file with the following code:

from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout
app = QApplication([])
window = QWidget()
layout = QVBoxLayout()
layout.addWidget(QPushButton('Top'))
layout.addWidget(QPushButton('Bottom'))
window.setLayout(layout)
window.show()
app.exec_()

Execute the code:

python file.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment