В Qt Assistant читаю:
QMessageBox msgBox
msgBox.setText("The document has been modified.")
msgBox.setInformativeText("Do you want to save your changes?")
msgBox.setStandardButtons(QMessageBox::Save|QMEssageBox::Discard|QMessageBox::Cancel)
msgBox.setDefaultButton(QMessageBox.Save)
int ret=msgBox.exec()
На питоне пишу аналогично:
mb=QMessageBox()
mb.setText(u'The document has been modified.')
mb.setInformativeText(u'Do you want to save your changes?')
mb.setStandardButtons(QMessageBox.Save|QMEssageBox.Discard|QMessageBox.Cancel)
mb.setDefaultButton(QMessageBox.Save)
answ=mb.exec()
И на последней строке получаю:
answ=mb.exec()
^
SyntaxError: invalid syntax
Что я делаю не так?