How to allow resizing of QMessageBox in PyQt4

Posted by Simeon Fitch on Stack Overflow See other posts from Stack Overflow or by Simeon Fitch
Published on 2010-04-16T18:38:19Z Indexed on 2010/04/16 18:43 UTC
Read the original article Hit count: 292

Filed under:
|
|
|

I'm using the nice feature in QMessageBox to optionally show detailed text to the user. However, the window after expansion is still fairly small, and one immediately tries to resize the window so more of the details are visible. Even after setting what I think are the proper settings it won't allow resizing.

Here's the relevant snippet of PyQt4 code:


    mb = QMessageBox()
    mb.setText("Results written to '%s'" % filename)
    mb.setDetailedText(str(myData))
    mb.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
    mb.setSizeGripEnabled(True)

Am I missing a step and/or is this at all possible?

© Stack Overflow or respective owner

Related posts about python

Related posts about pyqt4