diff --git a/Concept.png b/Concept.png new file mode 100644 index 0000000..bbe5f87 Binary files /dev/null and b/Concept.png differ diff --git a/Login.ui b/Login.ui new file mode 100644 index 0000000..c8c6ccd --- /dev/null +++ b/Login.ui @@ -0,0 +1,277 @@ + + + MainWindow + + + + 0 + 0 + 448 + 708 + + + + MainWindow + + + QMainWindow { + + background: rgb(46, 49, 146); +} + + + Qt::ToolButtonIconOnly + + + QTabWidget::Triangular + + + + + + 0 + 0 + 591 + 721 + + + + false + + + QFrame { + background: rgb(46, 49, 146); +} + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 71 + 103 + 121 + 21 + + + + + Sitka Text Semibold + -1 + 50 + false + false + + + + Qt::LeftToRight + + + QLabel { + id: headline_1; + font : 15px; + color: rgb(244, 178, 0); + background: transparent; +} + + + Exium everyday + + + Qt::AutoText + + + Qt::AlignCenter + + + + + + 71 + 25 + 286 + 81 + + + + + Sitka Text Semibold + -1 + 50 + false + false + + + + Qt::LeftToRight + + + QLabel { + id: headline; + font : 90px; + color: whitesmoke; +} + + + Exium + + + Qt::AutoText + + + Qt::AlignCenter + + + + + + 197 + 103 + 171 + 21 + + + + + Sitka Text Semibold + -1 + 50 + false + false + + + + Qt::LeftToRight + + + QLabel { + id: headline_1; + font : 15px; + color: whitesmoke; + background: transparent; +} + + + Grow Your Knowledge! + + + Qt::AutoText + + + Qt::AlignCenter + + + + + + 90 + 600 + 271 + 51 + + + + QPushButton { + id:pushButton; + font: 20px; + font-weight:700; + color: rgb(43, 45, 135); + background:rgb(244, 178, 0) ; +} + + + Get Started ! + + + + + + 55 + 220 + 331 + 31 + + + + QLabel { + font: 16px; + font-weight:700; + color:whitesmoke; +} + + + Type your name here to get started : + + + + + + 92 + 261 + 281 + 41 + + + + QTextEdit { + font: 25px; + background:white; + border: 1px solid white; + border-radius: 5px; +} + + + Qt::ImhMultiLine + + + QFrame::Raised + + + + + + 57 + 261 + 41 + 41 + + + + QLabel { + id:label_2; + font: 16px; + font-weight:700; + color:black; + background:white; + border: 1px solid white; + border-radius: 10px 2px; +} + + + + + + avatar.png + + + true + + + headline + headline_2 + headline_3 + pushButton + label + textEdit + label_2 + + + + + + + diff --git a/avatar.png b/avatar.png new file mode 100644 index 0000000..047d8ea Binary files /dev/null and b/avatar.png differ diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..2419327 Binary files /dev/null and b/logo.png differ diff --git a/main.py b/main.py index 1cfabaa..bd308d8 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,8 @@ -import requests import json +import os +import requests -response = requests.get("https://opentdb.com/api.php?amount=10") +response = requests.get("https://opentdb.com/api.php?amount=10&difficulty=hard") def requestJson(obj): # create a formatted string of the Python JSON object @@ -9,5 +10,22 @@ def requestJson(obj): return text # Parse JSON into an object with attributes corresponding to dict keys. -x = json.loads(requestJson(response.json()["results"])) -print(x[0]["category"]) \ No newline at end of file +data = json.loads(requestJson(response.json()["results"])) +#print(x[0]["category"]) + +#--------------------- Design ---------------------# +from ast import If +from PyQt5.QtWidgets import QMainWindow, QApplication +from PyQt5.uic import loadUi +import sys + +class Main(QMainWindow): + def __init__(self): + super(Main, self).__init__() + loadUi('Login.ui', self) + +if __name__ == '__main__': + app = QApplication(sys.argv) + ui = Main() + ui.show() + app.exec_()