forked from kenwaldek/pythonprogramming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyqt5_lesson_02.py
More file actions
28 lines (23 loc) · 857 Bytes
/
pyqt5_lesson_02.py
File metadata and controls
28 lines (23 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /usr/bin/env python3
# -*- coding:utf-8 -*-
###############################################################
# kenwaldek MIT-license
# Title: PyQt5 lesson 2 Version: 1.0
# Date: 08-01-17 Language: python3
# Description: pyqt5 gui empty window with title
# pythonprogramming.net from PyQt4 to PyQt5
###############################################################
# do something
import sys
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow
class window(QMainWindow):
def __init__(self):
super(window, self).__init__()
self.setGeometry(50, 50, 500, 300)
self.setWindowTitle('pyqt5 Tut')
# self.setWindowIcon(QIcon('pic.png'))
self.show()
app = QApplication(sys.argv)
Gui = window()
sys.exit(app.exec_())