-
Notifications
You must be signed in to change notification settings - Fork 0
/
positioning.py
38 lines (28 loc) · 927 Bytes
/
positioning.py
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
29
30
31
32
33
34
35
36
37
38
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow, QLabel
from PyQt5.QtGui import QIcon
class App(QMainWindow):
def __init__(self):
super().__init__()
self.title = 'PyQt absolute positioning - pythonspot.com'
self.left = 100
self.top = 100
self.width = 1440
self.height = 680
self.initUI()
def initUI(self):
self.setWindowTitle(self.title)
self.setGeometry(self.left, self.top, self.width, self.height)
label = QLabel('Python', self)
label.move(50,50)
label2 = QLabel('PyQt5', self)
label2.move(100,100)
label3 = QLabel('Examples', self)
label3.move(150,150)
label4 = QLabel('pytonspot.com', self)
label4.move(200,200)
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = App()
sys.exit(app.exec_())