-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyWindow.py
More file actions
80 lines (68 loc) · 2.69 KB
/
MyWindow.py
File metadata and controls
80 lines (68 loc) · 2.69 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Form implementation generated from reading ui file 'WIndow.ui'
#
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
import base64
import glob
import os
from tkinter import Image
import requests
from PyQt6 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(401, 310)
Form.setStyleSheet("QWidget{\n"
"background-color:\"#rgb(0, 0, 0)\"\n"
"}")
self.widget = QtWidgets.QWidget(parent=Form)
self.widget.setGeometry(QtCore.QRect(90, 250, 221, 41))
self.widget.setObjectName("widget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.pushButton = QtWidgets.QPushButton(parent=self.widget)
self.pushButton.setStyleSheet("QPushButton{\n"
" background-color:\"white\"\n"
"}")
self.pushButton.setObjectName("pushButton")
self.pushButton.clicked.connect(self.click_generate_button)
self.horizontalLayout.addWidget(self.pushButton)
self.pushButton_2 = QtWidgets.QPushButton(parent=self.widget)
self.pushButton_2.setStyleSheet("QPushButton{\n"
" background-color:\"white\"\n"
"}")
self.pushButton_2.setObjectName("pushButton_2")
self.horizontalLayout.addWidget(self.pushButton_2)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def click_generate_button(self):
image_list=[]
image_url = "https://github.com/hfg-gmuend/openmoji/tree/master/src/symbols/geometric"
response = requests.get(image_url)
if response.status_code != 200:
print(response.status_code)
try:
m=response.json()
except:
print("Error")
l=[link["download_url"] for link in m]
print(l)
#os.listdir(image_url)
#image = requests.get(image_url).json()
#print(image)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "App"))
self.pushButton.setText(_translate("Form", "Generate"))
self.pushButton_2.setText(_translate("Form", "Group"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Form = QtWidgets.QWidget()
ui = Ui_Form()
ui.setupUi(Form)
Form.show()
sys.exit(app.exec())