Multiple choice dialog

Does slicer have any method that’s very similar to the
slicer.util. confirmYesNoDisplay
but instead of being just Yes or No, you can add custom number of buttons and give the buttons any labels you want? If so, syntax and example of how it’s used would be really helpful.
Thanks,
Rohan Nadkarni

If Slicer doesn’t have exactly what you need, then usually it’s easy to make something custom with QDialog. If you think there’s a general purpose feature that would be good to add to slicer.util a PR would be welcome.

https://doc.qt.io/qt-5/qdialog.html

1 Like

Ok, I’ll try that out

QMessageBox has many options, you can define custom buttons, too. You can search for QMessageBox and ctkMessageBox in .py files in Slicer source code to see examples.