Good evening I have the following code:
from PyQt5.QtWidgets import QMainWindow, QApplication
from PyQt5 import uic
from PyQt5.QtCore import Qt
from tabla import tabla_style
class Principal(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
uic.loadUi("new_exe.ui",self)
self.setWindowFlags(Qt.FramelessWindowHint)
self.b_close.clicked.connect(lambda:self.close())
self.b_min.clicked.connect(lambda:self.showMinimized())
if self.combo.currentIndex() == 0:
self.stackedWidget.setCurrentIndex(0)
elif self.combo.currentIndex()== 1:
self.stackedWidget.setCurrentIndex(1)
app = QApplication([])
p = Principal()
p.show()
app.exec_()
and what I'm trying to do is that when I change the value of qcombobox I change the index of the stakedwidget however it does not work Any suggestions?