Author Topic: Boolean window  (Read 3161 times)


  • Newbie
  • *
  • Posts: 19
    • View Profile
Boolean window
« on: November 27, 2014, 07:28:47 PM »
I know about the possibility in the internal python to get input values from user with
Code: [Select]"Input")
Is there a way to have a similar window with boolean values buttons? Such as Yes/No (and perhaps cancel)?
If so, how and how can I use the selected output?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: Boolean window
« Reply #1 on: December 22, 2014, 05:11:50 PM »
Hello giancan,

I think you can use the following sample as a reference for your code:
Code: [Select]
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:
Best regards,
Alexey Pasumansky,
Agisoft LLC