Jun-08-2022, 08:31 AM
(This post was last modified: Jun-08-2022, 09:56 AM by Axel_Erfurt.)
(Jun-07-2022, 11:46 PM)Extra Wrote: So if nothing is selected and the user presses a button, a msgBox pops up reminding the user to select a row before clicking the button.
That is possible, for example the checkout button
def CheckoutClicked(self): #Print in terminal for testing: if self.InventoryDisplay.selectedIndexes(): print("row selected") #Switch from this screen to the Checkout Popup Screen (Scene Swap): # from CheckoutPopup import Ui_CheckoutPopup # x = Ui_CheckoutPopup() # x.ConfirmClicked() # print("Test: " ,x.CheckoutSpinBox.value()) # self.win = Ui_CheckoutPopup() # self.win.show() # #self.close() self.ex = Ui_CheckoutPopup(parent=self) self.ex.show() else: msgBox = QMessageBox.warning(None, "Error", "No row is selected!\nPlease select a row", QMessageBox.Close)