-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoadEWebsiteDialog.py
58 lines (48 loc) · 1.76 KB
/
LoadEWebsiteDialog.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
48
49
50
51
52
53
54
55
56
57
"""
Deprecated
"""
from PyQt6.QtWidgets import QDialog, QLabel, QVBoxLayout, QWidget, QLineEdit
from PyQt6.QtCore import Qt
class LoadEWebsiteDialog(QDialog):
@classmethod
def create(cls):
return cls
"""
A custom Qt dialog shown when the user wants to load an hosted E-HTML website
"""
QFooterDimensionMargins = (50, 10, 10, 50)
QSplashScreenImageSize = {"width": 500, "height": 323}
def __init__(self) -> None:
super().__init__(None)
self.setWindowFlags(Qt.WindowType.WindowStaysOnTopHint) # A window with no frame (i.e close buttons etc)
self.__layout = QVBoxLayout() # Top-To-Bottom
self.setObjectName("QCustomDialog")
self.setLayout(self.__layout) # Setting the layout
self.setStyleSheet("QDialog#QCustomDialog { border-radius:100px }")
self.__init__widgets()
def addWidget(self, widget: QWidget) -> None:
# Adds a Widget to the Dialog
self.__layout.addWidget(widget)
return
def __init__widgets(self):
Heading = QLabel("Open E-HTML Website")
Heading.setAlignment(Qt.AlignmentFlag.AlignLeft)
Heading.setObjectName("H1")
Heading.setStyleSheet("""
font-size: 20px;
border: 10px double white;
border-right: none;
border-left: none;
border-top: none;
padding-bottom: 10px;
""")
Content = QLabel("Load an encrypted Website from the internet")
InputURL = QLineEdit()
InputURL.setPlaceholderText("Enter Website URL...")
self.addWidget(Heading)
self.addWidget(Content)
self.addWidget(InputURL)
...
def show(self):
self.exec()
super().show()