Python In worlde [closed]

2 days ago 5
ARTICLE AD BOX

Good night all I'm a noob at python and just learned PyQt5 and trying to make A Pokémon Wordle in it I'm trying to center the first label using the set alignment feature in pyQt5 here's the code

import sys from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QPushButton, QWidget, QVBoxLayout from PyQt5.QtGui import QFont from PyQt5 import QtCore import requests # API response = requests.get("https://pokeapi.co/api/v2/pokemon?limit=1000") data = response.json() pokemon_list = data['results'] #Front end game class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("Pokedle") self.setGeometry(3000, 700, 700, 700) #Title self.label = QLabel("Pokedle", self) self.label.setAlignment(Qt.AlignCenter) self.label.setFont(QFont("Arial", 20)) #Buttons def main(): app = QApplication(sys.argv) window = MainWindow() window.show() sys.exit(app.exec_()) if __name__ == '__main__': main()

Where am I going wrong would love help on this thanks

Read Entire Article