Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Python PyQt5

# pip install PyQt5==5.15.2
from PyQt5.QtWidgets import QApplication,QMainWindow,QLabel
import sys
app=QApplication(sys.argv)
app.setStyle('Fusion')
app.setApplicationName('PyQt5 App')
win=QMainWindow()
label=QLabel()
label.setText('An App')
win.setCentralWidget(label)
win.show()
sys.exit(app.exec_())
Comment

basic pyqt5 setup

from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel
import sys

def main():
    app = QApplication(sys.argv)
    win = QMainWindow()
    win.setGeometry(200,200,300,300) 
    win.setWindowTitle("My first window!") 
    
    label = QLabel(win)
    label.setText("my first label")
    label.move(50, 50)  

    win.show()
    sys.exit(app.exec_())

main()  # make sure to call the function
Comment

pyqt5 tutorial

app.exec()
Comment

PREVIOUS NEXT
Code Example
Python :: dataset for cancer analysis in python 
Python :: python if not null or empty 
Python :: remove all rows with at least one zero pandas 
Python :: see attributes of object python 
Python :: histogram image processing python 
Python :: make a gif with images python 
Python :: how to code python 
Python :: nested loop in list comprehension 
Python :: how to add item to a list python 
Python :: how to remove the last letter of a string python 
Python :: python split paragraph 
Python :: time difference between timestamps python 
Python :: mkvirtualenv environment python 3 
Python :: python using numpy 
Python :: pytube 
Python :: embed image in html from python 
Python :: if main python 
Python :: python check if list contains 
Python :: how to install pyinstaller 
Python :: creating empty set and append python 
Python :: how to search in django 
Python :: play video in colab 
Python :: python is inf 
Python :: is python good for web development 
Python :: app is not a registered namespace django 
Python :: how to count things in a list python 
Python :: how to for loop for amount in list python 
Python :: view all columns pandas 
Python :: Sending POST request in Django 
Python :: how to take date as input in python 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =