Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pyqt popup yes no

msg = QMessageBox()
msg.setIcon(QMessageBox.Information)
msg.setText("Sicher, dass du dies entfernen möchtest?")
msg.setWindowTitle("Warnung")
msg.addButton(QPushButton('Ja'), QMessageBox.YesRole)
msg.addButton(QPushButton('Abbrechen'), QMessageBox.RejectRole)
resp = int(msg.exec_())
if resp == 0:
  # Do this if Yes pressed
 
PREVIOUS NEXT
Tagged: #pyqt #popup
ADD COMMENT
Topic
Name
9+3 =