-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.py
47 lines (37 loc) · 1.14 KB
/
ui.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
39
40
41
42
43
44
45
46
47
import sys
import threading
import time
import urllib.request
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from main import *
from utils import *
class Window(QMainWindow):
def __init__(self):
super(Window, self).__init__()
self.url = getIconLink(call(), 4)
self.mymap = QPixmap()
self.data = urllib.request.urlopen(self.url).read()
self.I = QLabel(self)
self.mymap.loadFromData(self.data)
self.I.setPixmap(self.mymap)
self.rBTN = QPushButton()
self.rBTN
#self.cw = QWidget(self)
self.setCentralWidget(self.I)
self.mainlay = QVBoxLayout()
self.mainlay.addWidget(self.I)
self.mainlay.addWidget(self.rBTN)
def refresh():
print("function: refreshUI")
def run():
app = QApplication(sys.argv)
app.setStyle('Breeze')
app.setStyleSheet("QMainWindow { background-color: #101010 }")
win = Window()
win.show()
app.exit(app.exec_())
if __name__ == "__main__":
run()
# time.sleep(1800)