Hello giancan,
I think you can use the following sample as a reference for your code:
import PhotoScan
from PySide import QtCore, QtGui
app = QtGui.QApplication.instance()
parent = app.activeWindow()
msg = "Are you sure you want to continue?"
reply = QtGui.QMessageBox.question(parent, 'Message', msg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
if reply == QtGui.QMessageBox.Yes:
print("yes")
else:
print("no")