self.setGeometry(100, 100, 320, 400)
# calling method
self.UiComponents()
# showing all the widgets
self.show()
# method for components
def UiComponents(self):
# counter variable
self.counter = -1
# choice variable
self.choice = 0
# creating head label
head = QLabel("Rock Paper Scissor", self)
# setting geometry to the head
head.setGeometry(20, 10, 280, 60)
# font
font = QFont('Times', 15)
font.setBold(True)
font.setItalic(True)
font.setUnderline(True)
# setting font to the head
head.setFont(font)
# setting alignment of the head
head.setAlignment(Qt.AlignCenter)
# setting color effect to the head
color = QGraphicsColorizeEffect(self)
color.setColor(Qt.darkCyan)
head.setGraphicsEffect(color)
# creating a vs label
self.vs = QLabel("vs", self)