Show QMessagebox details by default?

447 views
Skip to first unread message

Eric Thivierge

unread,
Jun 16, 2015, 9:45:22 AM6/16/15
to python_in...@googlegroups.com
Is there a way to open a QMessagebox while calling setDetailedText() and
have those details showing by default?

Sample Code:
msgBox = QtGui.QMessageBox()
msgBox.setText("The document has been modified.")
msgBox.setInformativeText("Do you want to save your changes?")
msgBox.setStandardButtons(QtGui.QMessageBox.Save |
QtGui.QMessageBox.Discard | QtGui.QMessageBox.Cancel)
msgBox.setDefaultButton(QtGui.QMessageBox.Save)
msgBox.setDetailedText('blah blha blhab lhab a;lbh')

msgBox.show()

--
Eric Thivierge
Rigging Lead


Justin Israel

unread,
Jun 16, 2015, 3:20:26 PM6/16/15
to python_in...@googlegroups.com

I don't think there is any public part of its api that gives you that option. You would either need to hack on it in a subclass, or the instance of the QMessageBox, to try and find the child button to click() . Or you would have to design your own that just shoes more info.


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/55802866.9040402%40hybride.com.
For more options, visit https://groups.google.com/d/optout.

Eric Thivierge

unread,
Jun 16, 2015, 3:23:18 PM6/16/15
to python_in...@googlegroups.com, Justin Israel
Yeah I'm creating my own dialog now. Thanks Justin.
> <mailto:python_inside_maya%2Bunsu...@googlegroups.com>.
> --
> You received this message because you are subscribed to the Google
> Groups "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to python_inside_m...@googlegroups.com
> <mailto:python_inside_m...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2N%2BnJRy6L1tMCOwxELe4W9GK%2BVWWGvB3cRWLJ1CSfWVw%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2N%2BnJRy6L1tMCOwxELe4W9GK%2BVWWGvB3cRWLJ1CSfWVw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages