class MainWindowWindow(QMainWindow, UiMainWindow): def init(self, authwindow):…
- User
class MainWindowWindow(QMainWindow, Ui_MainWindow): def init(self, auth_window): super(MainWindowWindow, self).init() self.setupUi(self) self.auth_window = auth_window self.initialize_signals()
code# You can add more initialization code here if necessary#************************************************* def initialize_signals(self): # Connect comboBox signals to methods self.comboBox_3.currentIndexChanged.connect(self.handle_comboBox_3_change) self.comboBox_6.currentIndexChanged.connect(self.handle_comboBox_6_change)
code# Connect pushButton signals to methods self.pushButton_2.clicked.connect(self.handle_push_button_2) self.pushButton_3.clicked.connect(self.handle_push_button_3) def handle_comboBox_3_change(self, index): if index == 0: # Index for "1" self.tabWidget.setCurrentIndex(0) # Set to tab3 elif index == 1: # Index for "2" self.tabWidget.setCurrentIndex(1) # Set to tab4 def handle_comboBox_6_change(self, index): if index == 0: # Index for "3" self.tabWidget.setCurrentIndex(2) # Set to tab5 def handle_push_button_2(self): # Set tabWidget to tab2 self.tabWidget_3.setCurrentIndex(1) def handle_push_button_3(self): # Set tabWidget to tab (initial tab) self.tabWidget_3.setCurrentIndex(0) #*************************************************Как сделать чтобы при нажатии на кнопку push_button_2 переключаюсь на вкладку с кнопкой push_button_3 и открытии приложения первым выводился tab из tabWidget
- Assistant