def onActivated(self, idx): self.lbl.setText(self.distros[idx]) self.lbl.adjustSize() In the event handler, we set the selected text to the label and adjust the label's size to fit the text. Figure: QComboBox Q
void QComboBox::activated ( const QString & text ) [signal] This signal is sent when the user chooses an item in the combobox. The item's text is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use...
activated[str].connect(self.onClicked) # Move the position of the window self.move(800, 400) # Display the Window self.show() # Define a method to handle the click event of the Combobox def onClicked(self, val): # Check any item is selected by the user or not if val == "...