Fábio Sooares Postado Maio 3, 2022 Denunciar Share Postado Maio 3, 2022 from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, QMetaObject, QObject, QPoint, QRect, QSize, QTime, QUrl, Qt) from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont, QFontDatabase, QGradient, QIcon, QImage, QKeySequence, QLinearGradient, QPainter, QPalette, QPixmap, QRadialGradient, QTransform) from PySide6.QtWidgets import (QApplication, QGridLayout, QLabel, QMainWindow, QPushButton, QSizePolicy, QSpacerItem, QWidget) class Ui_telainicial(object): def setupUi(self, telainicial): if not telainicial.objectName(): telainicial.setObjectName(u"telainicial") telainicial.resize(656, 444) icon = QIcon() icon.addFile(u"../logos/\u00edcone.png", QSize(), QIcon.Normal, QIcon.Off) telainicial.setWindowIcon(icon) telainicial.setStyleSheet(u"background-color: rgb(0, 169, 253);") telainicial.setIconSize(QSize(25, 25)) self.centralwidget = QWidget(telainicial) self.centralwidget.setObjectName(u"centralwidget") self.gridLayout_2 = QGridLayout(self.centralwidget) self.gridLayout_2.setObjectName(u"gridLayout_2") self.gridLayout = QGridLayout() self.gridLayout.setObjectName(u"gridLayout") self.btn_sair = QPushButton(self.centralwidget) self.btn_sair.setObjectName(u"btn_sair") self.btn_sair.setMinimumSize(QSize(151, 41)) self.btn_sair.setMaximumSize(QSize(500, 60)) font = QFont() font.setFamilies([u"Comic Sans MS"]) font.setPointSize(20) font.setItalic(False) self.btn_sair.setFont(font) self.btn_sair.setCursor(QCursor(Qt.PointingHandCursor)) self.btn_sair.setStyleSheet(u"QPushButton {\n" " color: rgb(255, 255, 255);\n" " background-color: rgb(108, 97, 169);\n" " border-radius:20px\n" "}\n" "\n" "QPushButton:hover{\n" " color: rgb(108, 97, 169);\n" " background-color: rgb(255, 255, 255);\n" " border-radius:20px\n" "}") self.gridLayout.addWidget(self.btn_sair, 10, 1, 1, 1) self.horizontalSpacer_2 = QSpacerItem(130, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.gridLayout.addItem(self.horizontalSpacer_2, 11, 2, 1, 1) self.verticalSpacer_5 = QSpacerItem(10, 10, QSizePolicy.Minimum, QSizePolicy.Fixed) self.gridLayout.addItem(self.verticalSpacer_5, 2, 1, 1, 1) self.verticalSpacer_2 = QSpacerItem(10, 10, QSizePolicy.Minimum, QSizePolicy.Fixed) self.gridLayout.addItem(self.verticalSpacer_2, 7, 1, 1, 1) self.btn_sobre_o_programa = QPushButton(self.centralwidget) self.btn_sobre_o_programa.setObjectName(u"btn_sobre_o_programa") self.btn_sobre_o_programa.setMinimumSize(QSize(151, 41)) self.btn_sobre_o_programa.setMaximumSize(QSize(500, 60)) font1 = QFont() font1.setFamilies([u"Comic Sans MS"]) font1.setPointSize(20) self.btn_sobre_o_programa.setFont(font1) self.btn_sobre_o_programa.setCursor(QCursor(Qt.PointingHandCursor)) self.btn_sobre_o_programa.setStyleSheet(u"QPushButton {\n" " color: rgb(255, 255, 255);\n" " background-color: rgb(113, 191, 79);\n" " border-radius:20px\n" "}\n" "\n" "QPushButton:hover{\n" " color: rgb(113, 191, 79);\n" " background-color: rgb(255, 255, 255);\n" " border-radius:20px\n" "}") self.gridLayout.addWidget(self.btn_sobre_o_programa, 8, 1, 1, 1) self.verticalSpacer = QSpacerItem(10, 10, QSizePolicy.Minimum, QSizePolicy.Fixed) self.gridLayout.addItem(self.verticalSpacer, 9, 1, 1, 1) self.btn_alunos = QPushButton(self.centralwidget) self.btn_alunos.setObjectName(u"btn_alunos") self.btn_alunos.setMinimumSize(QSize(151, 41)) self.btn_alunos.setMaximumSize(QSize(500, 60)) self.btn_alunos.setFont(font1) self.btn_alunos.setCursor(QCursor(Qt.PointingHandCursor)) self.btn_alunos.setStyleSheet(u"QPushButton {\n" " color: rgb(255, 255, 255);\n" " background-color: rgb(239, 78, 69);\n" " border-radius:20px\n" "}\n" "\n" "QPushButton:hover{\n" " color: rgb(239, 78, 69);\n" " background-color: rgb(255, 255, 255);\n" " border-radius:20px\n" "}") self.gridLayout.addWidget(self.btn_alunos, 1, 1, 1, 1) self.verticalSpacer_3 = QSpacerItem(20, 3, QSizePolicy.Minimum, QSizePolicy.Fixed) self.gridLayout.addItem(self.verticalSpacer_3, 3, 1, 1, 1) self.btn_professores = QPushButton(self.centralwidget) self.btn_professores.setObjectName(u"btn_professores") self.btn_professores.setMinimumSize(QSize(151, 41)) self.btn_professores.setMaximumSize(QSize(500, 60)) self.btn_professores.setFont(font1) self.btn_professores.setCursor(QCursor(Qt.PointingHandCursor)) self.btn_professores.setStyleSheet(u"QPushButton {\n" " color: rgb(255, 255, 255);\n" " background-color: rgb(252, 227, 36);\n" " border-radius:20px\n" "}\n" "\n" "QPushButton:hover{\n" " color: rgb(252, 227, 36);\n" " background-color: rgb(255, 255, 255);\n" " border-radius:20px\n" "}") self.gridLayout.addWidget(self.btn_professores, 4, 1, 1, 1) self.horizontalSpacer = QSpacerItem(130, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.gridLayout.addItem(self.horizontalSpacer, 11, 0, 1, 1) self.lbl_logo_telainicial = QLabel(self.centralwidget) self.lbl_logo_telainicial.setObjectName(u"lbl_logo_telainicial") self.lbl_logo_telainicial.setMinimumSize(QSize(200, 10)) self.lbl_logo_telainicial.setMaximumSize(QSize(500, 230)) self.lbl_logo_telainicial.setPixmap(QPixmap(u"../logos/Logo CEAI.png")) self.lbl_logo_telainicial.setScaledContents(True) self.gridLayout.addWidget(self.lbl_logo_telainicial, 0, 1, 1, 1) self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1) telainicial.setCentralWidget(self.centralwidget) self.btn_alunos.clicked.connect(self.mostrar_alunos) self.retranslateUi(telainicial) QMetaObject.connectSlotsByName(telainicial) ... def mostrar_alunos(self): from ui_aluno import Ui_telaaluno self.janelaaluno = QtWidgets.QMainWindow() self.ui_aluno = Ui_telaaluno() self.ui_aluno.setupUi(self.janelaaluno) self.janelaaluno.show Citar Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
Fábio Sooares
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.